Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 01-13-2009, 12:05 AM
outlawing Offline
forum loafer
 
Join Date: Dec 2008
Posts: 3
Lightbulb GeoS Show category and apostrophes

Hey guys, I've noticed there was a bug in the GeoS Show Category addon when we want to put apostrophes in categories' titles with <SC_BROWSE_CATEGORY> form.

After some times of pain , I've localized the line in the geos_show_category.php. It's the 524th.

Edit this :

PHP Code:
while(list($cat_id,$cat_name,$img_id,$img_cnt,$cat_alt_name) = mysql_fetch_row($query4))
        {
            
$sc_browse_category .= '<option value="index.php?category=' $cat_id '&amp;showimage=' $img_id '"';
            if(
$cat_id == $_GET["category"])    $sc_browse_category .= ' selected';
            
$sc_browse_category .= '>' . (($sc_oryg_lang == 1) ? $cat_name $cat_alt_name) . "</option>\n";
            
$sc_category_links_as_list_paged .= "<li><a href='index.php?category=" $cat_id "&amp;showimage=" $img_id "'>".(($sc_oryg_lang == 1) ? $cat_name $cat_alt_name)." (" $img_cnt ")</a></li>";
        } 
By this :

PHP Code:
while(list($cat_id,$cat_name,$img_id,$img_cnt,$cat_alt_name) = mysql_fetch_row($query4))
        {
            
$cat_name pullout($cat_name);
            
$cat_name htmlspecialchars($cat_name,ENT_QUOTES);
            
$cat_alt_name pullout($cat_alt_name);
            
$cat_alt_name htmlspecialchars($cat_alt_name,ENT_QUOTES);
            
$sc_browse_category .= '<option value="index.php?category=' $cat_id '&amp;showimage=' $img_id '"';
            if(
$cat_id == $_GET["category"])    $sc_browse_category .= ' selected';
            
$sc_browse_category .= '>' . (($sc_oryg_lang == 1) ? $cat_name $cat_alt_name) . "</option>\n";
            
$sc_category_links_as_list_paged .= "<li><a href='index.php?category=" $cat_id "&amp;showimage=" $img_id "'>".(($sc_oryg_lang == 1) ? $cat_name $cat_alt_name)." (" $img_cnt ")</a></li>";
        } 
It's working I think this little hack can be usefull and I hope GeoS will fix his beautiful addon

Sorry for my very bad english :/
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 11:30 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs