This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 21 - Pages: 2 [ 1 2 | Next ] - Last Post: 10-Jul-2012 20:48 Last Post By: AudioDoc Threads: [ Previous | Next ]
kristoffer

Posts: 2,340
Registered: 12/07/07
Further customize Jalbum blog badge
Posted: 09-Mar-2009 12:08
 
  Click to reply to this thread Reply
In a recent blog post we introduced the Jalbum blog badge.
...

Badge documentation has been moved to this page.

...

If you have any questions about the badge in general or about the customization options you can post them in this thread. We'd also love to see a link to your blog with a badge in it :)

That's it, happy customizing!

Edited by: kristoffer on 11-Jan-2010 17:49 (updated with link to documentation page)
helensgallery

Posts: 47
Registered: 02/27/08
Re: Further customize Jalbum blog badge
Posted: 11-Mar-2009 11:24   in response to: kristoffer in response to: kristoffer
 
  Click to reply to this thread Reply
I have tested the customization, very cool feature, here are some feedback:

  • the description of the album diplays as text only, so if there is a new line in the description it displays "br /" instead. => could be interpreted as html instead of text?

  • color of the text description is defined by the default a:link of the CSS (don't know if it is important, but maybe it could be easier to be able to change it the same way than the other texts in the badge)

  • some properties in the CSS are not read: I have added font-size and text-decoration, text-align, etc. They are correctly read offline, but not online (trying to change size of the text in the header, for example)

Anyway, I really enjoy the Jalbum blog badge, great job Kris!
kristoffer

Posts: 2,340
Registered: 12/07/07
Re: Further customize Jalbum blog badge
Posted: 11-Mar-2009 12:32   in response to: helensgallery in response to: helensgallery
 
  Click to reply to this thread Reply
Thank you very much for your input Helen!

the description of the album diplays as text only, so if there is a new line in the description it displays "br /" instead. => could be interpreted as html instead of text?

I do not think allowing HTML in the description is a good idea (the reasons are several, but mainly because it can mess up the entire formatting), but however an exception could be made for br tags.

color of the text description is defined by the default a:link of the CSS (don't know if it is important, but maybe it could be easier to be able to change it the same way than the other texts in the badge)

True, this could be improved.

some properties in the CSS are not read: I have added font-size and text-decoration, text-align, etc. They are correctly read offline, but not online (trying to change size of the text in the header, for example)

I will have to take a closer look at your badge, and if possible also the CSS that you use (perhaps you can email it to me?), to see which properties are overridden by which styles.

Thanks again for your input. I'm very happy that you're enjoying the badge :)
helensgallery

Posts: 47
Registered: 02/27/08
Re: Further customize Jalbum blog badge
Posted: 13-Mar-2009 13:46   in response to: kristoffer in response to: kristoffer
 
  Click to reply to this thread Reply
Hi Kris,

2 enhancement requests ;)

  • be able to send a value to display "my favorite albums" for example in the "m" parameter

  • be able to choose a "sort by" parameter (date created/date modified, for example)

Regards,
Helene
kristoffer

Posts: 2,340
Registered: 12/07/07
Re: Further customize Jalbum blog badge
Posted: 16-Mar-2009 09:46   in response to: helensgallery in response to: helensgallery
 
  Click to reply to this thread Reply
Hi again Helene,

The badge fetches its data from new RSS feeds that we've implemented (but not yet made public). Here is yours. Adding a new feed for favorite albums and adding a "sort by" parameter could be indeed be good additions in the future.
kristoffer

Posts: 2,340
Registered: 12/07/07
Re: Further customize Jalbum blog badge
Posted: 26-Mar-2009 13:08   in response to: helensgallery in response to: helensgallery
 
  Click to reply to this thread Reply
You can now change the color of the description by either using the color variable "_ja_badge_a_desc_color" or the CSS class "#ja-badge-main #ja-badge-cont .ja-badge-album-data p".
Wop

Posts: 5
Registered: 11/21/08
Re: Further customize Jalbum blog badge
Posted: 09-Apr-2009 21:26   in response to: kristoffer in response to: kristoffer
 
  Click to reply to this thread Reply
Hi I'm using the badge in a widget. In what part of the php file can I costumize the width and color in the jalbum-badge.php?

When I change settings in this part ,

var $default_options = array(
"header" => "My Jalbums",
"look" => 1,
"width" => 180

nothing happends on my page (www.vaneis.nl)..

Could you help me ?
kristoffer

Posts: 2,340
Registered: 12/07/07
Re: Further customize Jalbum blog badge
Posted: 10-Apr-2009 10:52   in response to: Wop in response to: Wop
 
  Click to reply to this thread Reply
To change the width you only have to modify that default value (I'd recommend changing it to 145 for your blog).

To make any other customizations you would have to modify this part:

function get_badge_settings($options) {
        $settings = "";
        if ($this->is_valid_text_option($options, "header")) {
            $settings .= "_ja_badge_header = \"".htmlspecialchars($options["header"], ENT_QUOTES)."\";\n";
        }
        if ($this->is_valid_numeric_options($options, "width")) {
            $settings .= "_ja_badge_width = ".$options["width"].";\n";
        }
        if ($this->is_valid_numeric_options($options, "look")) {
            $settings .= "_ja_badge_look = ".$options["look"].";\n";
        }
        return $settings;
    }


Let's say that you would want to change the background color, then you would have to add something like this (on the line before the return statement):

$settings .= "_ja_badge_bg_color = #ff0000;\n";


Edited by: kristoffer on 10-Apr-2009 10:54
Wop

Posts: 5
Registered: 11/21/08
Re: Further customize Jalbum blog badge
Posted: 10-Apr-2009 16:42   in response to: kristoffer in response to: kristoffer
 
  Click to reply to this thread Reply
Hi,

I fixed the width.

I',m Struggling with the other settings:

I can't change the (background) colors. I suppose I do something wrong. But my brains won't find it. COuld you help?

    function get_badge_settings($options) {
        $settings = "";
        if ($this->is_valid_text_option($options, "header")) {
            $settings .= "_ja_badge_header = \"".htmlspecialchars($options["header"], ENT_QUOTES)."\";\n";
        }
        if ($this->is_valid_numeric_options($options, "width")) {
            $settings .= "_ja_badge_width = 150;\n";
        }
        if ($this->is_valid_numeric_options($options, "look")) {
            $settings .= "_ja_badge_look = ".$options["look"].";\n";
        }
        if ($this->is_valid_numeric_options($options, "color")) {
            $settings .= "_ja_badge_bg_color = #C7DFE4;\n";
 
        }
        return $settings;
    }
kristoffer

Posts: 2,340
Registered: 12/07/07
Re: Further customize Jalbum blog badge
Posted: 13-Apr-2009 10:32   in response to: Wop in response to: Wop
 
  Click to reply to this thread Reply
Hi, there's no need to perform the "is valid option" check. I use those for validation of the values inserted from the options that's provided by the widget user interface. Since you will be hardcoding the color yourself there's no need to validate it.

Removing this if statement should get you going:
if($this->is_valid_numeric_options($options, "color")) {
 ...
}


Edit: Also, a small reminder! If you update to a new version of the pluigin in the future make sure that you create a backup copy of the php file before updating or your changes will be lost.
Wop

Posts: 5
Registered: 11/21/08
Re: Further customize Jalbum blog badge
Posted: 17-Apr-2009 22:16   in response to: kristoffer in response to: kristoffer
 
  Click to reply to this thread Reply
Hi Kristoffer,

Thankxz for your answer...

When I'm put this
$settings .= "_ja_badge_bg_color = #C7DFE4;\n";
I see a different color, but not the one I want. And someting strange happend: The width is back to his defaults with this line in the php. When i remove it , its back the the costumized width. Strange isn't?

I think the code above is only the background color, but how can i give different colors to the table?
xchh

Posts: 17
Registered: 01/03/09
Re: Further customize Jalbum blog badge
Posted: 18-Apr-2009 09:26   in response to: kristoffer in response to: kristoffer
 
  Click to reply to this thread Reply
Thanks Kristoffer for your information to customize the badge.
I am impatient to see if my adding of &c=10 to the chain of the second element will allow me to increase the number of albums visibles on my blog.
I cannot see it yet as it looks like the Badge has crashed this morning on the server, hope it will be fixed soon, I know it is beta still
Cheers
Afater a short hour of no access it works again, so it was a short time problem, I can see all my albums as well as others on different blogs
No worries

Edited by: xchh on 18-Apr-2009 09:31
kristoffer

Posts: 2,340
Registered: 12/07/07
Re: Further customize Jalbum blog badge
Posted: 18-Apr-2009 13:02   in response to: xchh in response to: xchh
 
  Click to reply to this thread Reply
Yes you are correct. Our web server partially went down but AnCa sorted it out. If this happens again we will now be notified about it right away so the downtime should be much shorter.
Wop

Posts: 5
Registered: 11/21/08
Re: Further customize Jalbum blog badge
Posted: 23-Apr-2009 19:16   in response to: Wop in response to: Wop
 
  Click to reply to this thread Reply
Hi Kristoffer,

Did you see my message?
kristoffer

Posts: 2,340
Registered: 12/07/07
Re: Further customize Jalbum blog badge
Posted: 23-Apr-2009 19:34   in response to: Wop in response to: Wop
 
  Click to reply to this thread Reply
Hi Wop, and sorry! I must have missed your message.

What you say about the width being reset does not seem right at all, I'll have to try that myself to see if I'm able to reproduce it (by the way, in the latest version of the plugin you can change the width from the widget interface).

To change the rest of the colors of the badge you need to specify more variables. See the "Color variables" in my intial post in this thread.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums