Page Index Toggle Pages: 1 2 [3]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Switch Smilies (Read 13470 times)
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Switch Smilies
Reply #30 - Oct 17th, 2004 at 5:34pm
Print Post  
Odd, there should at least be an error message if something did go wrong with coying the smilies. Note that this mod will not change the way yabb displays the smilies, all it does is to copy the smilie files located in your smilies_xyz folder over the existing yabb images.
  

The Administrator.
Back to top
WWW  
IP Logged
 
FinTeemu
Full Member
***
Offline



Posts: 220
Location: Turku
Joined: Feb 14th, 2002
Re: Switch Smilies
Reply #31 - Nov 21st, 2004 at 12:32am
Print Post  
Hi Michael, I'm also having some issues with this.

When I first installed and run this, it complained that I'm missing smilies_normal-folder and I added it. Apparently in the right places, cause it quit complaining. Then I noticed the current=smilies_easter changed to current=smilies_normal, so apparently it finds and modifies switchsmilies.txt as well.

Then I tried to change the easter dates so that it would appear, but I can't seem to make anything happen. The stock smilies are shown all the time. Even changed the line to this:
smilies_easter|01/01/04 00:00:00|01/01/05 23:59:59

So the easter should definitely be on, right? Roll Eyes The current=smilies_normal just stays in there and nothing changes...

I do have a smilies_easter in the same dir as smilies_normal and both have different smilies (with same filenames). I believe I have chmodded everything like the modfile says. And it doesn't even change the current in the switchsmileys.txt anyway, which it can modify, cause it already did.

Any ideas...? Undecided
  
Back to top
 
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Switch Smilies
Reply #32 - Nov 21st, 2004 at 3:56pm
Print Post  
hm you're right, it should at least modify switchsmilies.txt. I need some debug information in order to fix this one. Replace your SS_SwitchSmilies sub (Subs.pl) with this one:

Code
Select All
sub SS_SwitchSmilies {
 my  = (0);
 use Time::Local 'timelocal';
 fopen(SS_FILE,"$vardir/switchsmilies.txt") || &fatal_error("$txt{'23'} switchsmilies.txt");
 @data = <SS_FILE>;
 fclose(SS_FILE);
 ($dummy,$current) = split(/=/,$data[0]);
 ($dummy,$default) = split(/=/,$data[1]);
 $current =~ s~[\n\r]~~g;
 $default =~ s~[\n\r]~~g;
 shift @data;
 shift @data;
 my $debug = "";
 foreach $line (@data) {
  $line =~ s~[\n\r]~~g;
  ($name,$start,$stop) = split(/\|/,$line);
  $start =~ s/ / $txt{'107'} /g;
  $stop =~ s/ / $txt{'107'} /g;
  $debug .= "$start|$stop|$date|";
  $start = stringtotime($start);
  $stop = stringtotime($stop);
  $current_date = stringtotime($date);
  $debug .= "$start|$stop|$current_date|$current|$default";
  if (($current_date > $start) && ($current_date < $stop) && ($changed == 0)) {
   if ($current ne $name) { SS_CopySmilies($name); }
    $changed = 1;
   }
  }
  $debug .= "|$changed\n";
 if (($changed == 0) && $current ne $default) {
  SS_CopySmilies($default);
 }

 fopen(DEBUG,">>$vardir/debug.txt");
 print DEBUG $debug . "\n";
 fclose(DEBUG);
} 



Then browse a bit through your board. That will create a file named "Variables/debug.txt". Post the content of that file here.
  

The Administrator.
Back to top
WWW  
IP Logged
 
FinTeemu
Full Member
***
Offline



Posts: 220
Location: Turku
Joined: Feb 14th, 2002
Re: Switch Smilies
Reply #33 - Nov 22nd, 2004 at 3:47pm
Print Post  
Here's the contents of it after few refreshes:
Code
Select All
-bash-2.05b$ cat debug.txt
01/01/04  00:00:00|01/01/05  23:59:59|11/22/04   02:21:00|11/21/04  02:21:59|11/22/04   02:22:00|11/21/04  02:22:59|11/22/04   02:23:00|11/21/04  02:23:59|11/22/04   02:24:00|11/21/04  02:24:59|11/22/04   02:25:00|11/21/04  02:25:59|11/22/04   00:00:00|28/03/05  23:59:59|11/22/04   00:00:00|23/12/04  23:59:59|11/22/04   00:00:00|06/11/05  23:59:59|11/22/04   00:00:00|13/02/05  23:59:59|11/22/04   00:00:00|26/06/05  23:59:59|11/22/04   00:00:00|26/12/05  23:59:59|11/22/04  17:42:15|1134338400|1134424799|1101138135|smilies_easter|smilies_normal|1
 



So if I understand that right, $current should be "smilies_easter"...? It doesn't seem to update switchsmilies.txt though, no matter how I chmod it Undecided
  
Back to top
 
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Switch Smilies
Reply #34 - Nov 22nd, 2004 at 4:38pm
Print Post  
So your switchsmilies.txt looks like this?

Code
Select All
current=smilies_normal
default=smilies_normal
smilies_easter|01/01/04 00:00:00|01/01/05 23:59:00 


Because the debug information says that $current = smilies_easter. But that means that your file would look like this (which would be correct):

Code
Select All
current=smilies_easter
default=smilies_normal
smilies_easter|01/01/04 00:00:00|01/01/05 23:59:00 

  

The Administrator.
Back to top
WWW  
IP Logged
 
FinTeemu
Full Member
***
Offline



Posts: 220
Location: Turku
Joined: Feb 14th, 2002
Re: Switch Smilies
Reply #35 - Nov 22nd, 2004 at 8:45pm
Print Post  
Can't seem to access the server right now, but last time I checked, it was the above (current=smilies_normal). I'll doublecheck it when I can connect to it...
  
Back to top
 
IP Logged
 
bod
Junior Member
**
Offline


I love YaBB 1G - SP1.2!

Posts: 89
Joined: Jun 4th, 2004
Re: Switch Smilies
Reply #36 - Dec 4th, 2004 at 6:42pm
Print Post  
appears to work fine - however i'm having to refresh browser to see changes is there anyway force a refresh so changed smiley set will so on it's own?
  
Back to top
 
IP Logged
 
bod
Junior Member
**
Offline


I love YaBB 1G - SP1.2!

Posts: 89
Joined: Jun 4th, 2004
Re: Switch Smilies
Reply #37 - Dec 4th, 2004 at 7:50pm
Print Post  
.oops. it does it already when i reopen my browser, something to be said for a bit of patient Grin

this is a great mod Wink
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
Send TopicPrint