Pixelpost Forum

Pixelpost Forum (http://www.pixelpost.org/forum/index.php)
-   Hacks and Modifications (http://www.pixelpost.org/forum/forumdisplay.php?f=16)
-   -   GeoS Show category and apostrophes (http://www.pixelpost.org/forum/showthread.php?t=10080)

outlawing 01-13-2009 12:05 AM

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 :p, 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 :p I think this little hack can be usefull and I hope GeoS will fix his beautiful addon :)

Sorry for my very bad english :/


All times are GMT. The time now is 06:39 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.