Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Sub forum icons
Avatar
Meztli
Sweden
Member
sp_UserOfflineSmall Offline
Dec 18, 2013 - 3:15 am

Yellow Swordfish said
Hope so. Currently being tested here and should make it into the next update.

Hello guys,

Thanks for the latest SP update. Every thing got updated nicely without any issues.

However the sub forum icon issue still remain. I was hoping it should be fixed in this update. Any schedule for when it might get fixed?

Cheers

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 18, 2013 - 4:42 am

As far as our testing went it most certainly was fixed. Tested out just fine.

Can you remind me again of the problem in case I misunderstood first time around - and perhaps provide a link to an example if you have one current?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Meztli
Sweden
Member
sp_UserOfflineSmall Offline
Dec 18, 2013 - 5:07 am

Yellow Swordfish said
As far as our testing went it most certainly was fixed. Tested out just fine.

Can you remind me again of the problem in case I misunderstood first time around - and perhaps provide a link to an example if you have one current?

I will attach some images in a moment, that shows the issue.

 

Avatar
Meztli
Sweden
Member
sp_UserOfflineSmall Offline
Dec 18, 2013 - 5:49 am

Hi Andy,

Take a look at the images.

Image nr2 shows you that the support forum icon does not switch to the red version which should pop up when the forum have updated posts.

I have the same icon issue in all sub forums across my site.

1.jpgImage Enlarger2.jpgImage Enlarger3.jpgImage Enlarger

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 18, 2013 - 8:26 am

Well I have no idea what has gone on here. I know 100% I changed that code but you are quite right - it ain't there now.

I have restored the missing code. It is a bit complicated but I could try and show you the changes if you wanted to try applying them...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Meztli
Sweden
Member
sp_UserOfflineSmall Offline
Dec 18, 2013 - 10:58 am

Yellow Swordfish said
Well I have no idea what has gone on here. I know 100% I changed that code but you are quite right - it ain't there now.

I have restored the missing code. It is a bit complicated but I could try and show you the changes if you wanted to try applying them...

Yes please, that would be much appricated.

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 18, 2013 - 12:11 pm

OK - I will give it a try... there are two files involved.

1 - /simple-press/forum/content/classes/sp-forum-view-class.php

1.1 - at line 479 locate this line of code:

$f[$forumid]->forum_icon = sanitize_file_name($r->forum_icon);

and add below it:

$f[$forumid]->forum_icon_new = sanitize_file_name($r->forum_icon_new);

1.2 - at line 545 locate this line of code:

$f[$fidx]->subforums[$sub->forum_id]->forum_icon = sanitize_file_name($sub->forum_icon);

and add below it:

$f[$fidx]->subforums[$sub->forum_id]->forum_icon_new = sanitize_file_name($sub->forum_icon_new);

1.3 - at line 695 locate this line of code:

$spdb->fields = 'forum_id, forum_name, forum_slug, forum_desc, forum_seq, forum_status, forum_disabled, forum_icon, topic_icon, topic_icon_new, forum_rss_private, post_id, post_id_held, topic_count, post_count, post_count_held, parent, children';

and add the following text after 'forum_icon' along with the necessary comma:

forum_icon_new,

2 - /simple-press/forum/content/sp-forum-view-functions.php

2.1 Locate the block of code between lines 88 and 97. These start with the line:

if (!empty($spThisSubForum->forum_icon)) {

and end with the line:

$out = "<img id='$tagId' class='$tagClass' src='$icon' alt='' />\n";

Replace the whole block of code with:

$path = SPTHEMEICONSDIR;
$url = SPTHEMEICONSURL;
if($spThisSubForum->unread) {
    $fIcon = sanitize_file_name($iconUnread);
    if (!empty($spThisSubForum->forum_icon_new)) {
        $fIcon = sanitize_file_name($spThisSubForum->forum_icon_new);
        $path = SFCUSTOMDIR;
        $url = SFCUSTOMURL;
    }
} else {
    $fIcon = sanitize_file_name($icon);
    if (!empty($spThisSubForum->forum_icon)) {
        $fIcon = sanitize_file_name($spThisSubForum->forum_icon);
        $path = SFCUSTOMDIR;
        $url = SFCUSTOMURL;
    }
}
if(!file_exists($path.$fIcon)) {
    $fIcon = SPTHEMEICONSURL.sanitize_file_name($icon);
} else {
    $fIcon = $url.$fIcon;
}
if ($get) return $fIcon;
$out = "<img id='$tagId' class='$tagClass' src='$fIcon' alt='' />\n";

and all being well that should do...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Meztli
Sweden
Member
sp_UserOfflineSmall Offline
Dec 20, 2013 - 9:39 am

Weee... it´s working. I love you Andy.

I wish both you and Steve a Merry Christmas and Happy New Year!

A happy, happy, happy Swede kiss

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 20, 2013 - 1:07 pm

Great news. Sorry that something clearly went wrong on the first attempt...
Have a good Christmas your end up there in the cold... :)

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 20, 2013 - 9:40 pm

Thanks!  Same to you Meztli!

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620