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


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Switch Smilies
Apr 11th, 2004 at 3:48pm
Print Post  
Have different smilies for X-Mas, Easter, Halloween and any other event you like. By setting timeframes and foldernames in switchsmilies.txt, you can automate the copy of custom smilie images (for example from http://www.penthesilea.ch/yabb-smiley-sets/) from those defined folders into your yabb images directory.



Installation Instructions:
--------------------------
1. install the mod
2. upload ALL modified files
3. open switchsmilies.txt and modify it according to the instructions given below
4. upload switchsmilies.txt to your Variables folder, in ASCII mode, chmod 666
5. upload your custom smilie images into the proper folders (e.g. into images/smilies_easter/ and images/smilies_xmas/).
6. chmod your YaBB images dir to 777 and ALL your smilie images to 666 (see list below). If you're using the "add more smilies"-mod, you'll have to do this with your images/smilies folder.

Here is a list of all default smilies in yabb which you may want to replace:
  angry.gif
  cheesy.gif
  cool.gif
  cry.gif
  embarassed.gif
  grin.gif
  huh.gif
  kiss.gif
  laugh.gif
  lipsrsealed.gif
  rolleyes.gif
  sad.gif
  shocked.gif
  smiley.gif
  tongue.gif
  undecided.gif
  wink.gif


How to modify switchsmilies.txt:
--------------------------------
Here is now the file looks like:

1st line: the name of the folder currently in use (modified by the mod automatically)

2nd line: the name of the folder used when no other event takes place (don't forget to copy your default smilie images into that folder)

3rd line til end of file: "foldername|start date|end date"
Keep in mind that the date/time set here has to be in the servers local time. You can add as many entries into this file as you like.


Version History:
----------------
v1.1: added instructions to chmod smilie images, fixed file copying, improved error messages
v1.0: now compatible with "add more smilies" mod
v1.0 Beta: initial release
« Last Edit: Oct 1st, 2004 at 6:23pm by Administrator »  

switch_smilies_v10.zip (Attachment deleted)

The Administrator.
Back to top
WWW  
IP Logged
 
Dam Yankee
God Member
*****
Offline



Posts: 1538
Location: Maryville
Joined: Jun 13th, 2003
Gender: Female
Re: Switch Smilies
Reply #1 - Apr 11th, 2004 at 10:54pm
Print Post  
Coolness!   Grin
  
Back to top
WWW  
IP Logged
 
Gekko
Full Member
***
Offline



Posts: 231
Joined: Aug 21st, 2001
Gender: Male
Re: Switch Smilies
Reply #2 - Apr 13th, 2004 at 5:19am
Print Post  
I tried but failed. Maybe incompatible with "Add more smilies 3"-mod?

cu Gekko
  
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 #3 - Apr 13th, 2004 at 10:24am
Print Post  
It should work fine with the add more smilies mod. What step failed for you? what other mods do you have installed and what yabb version do you use?
  

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



Posts: 231
Joined: Aug 21st, 2001
Gender: Male
Re: Switch Smilies
Reply #4 - Apr 23rd, 2004 at 6:07am
Print Post  
I'm using version SP1.1 and have a lot of mods installed:

add_modifier_ip21
add_more_membergroups
add_smilies_3
admin_color_enhance
adv_lng 3.0
adv_memberview_plus_31
aimb_2_sp11-final
all_sp11
attached_image_size
back_to_top_10
better_links
birthday4
BoardIndex_Speed-Up-001
checklength
colorsinusersonline
disallow_users_delete
display_users_pass
edit_with_reason
error_log
favlistsbeta7
file_attachment
fix_remove_posts
foreign_enc
font_fix
german_SP1
invisibility_11_sp1
lastread_beta_72a
loadingtime
mail_new_thread
memepermap 2.6b
message_sort_20_sp1
MLsecurityfix
more_bc_options
multidel
mute_user_sp1
new_member_notification
nicer_post_form_11_sp11
notification_bugfix
online_on_messagedisplay
printpage_censor_bug
print_who_is_online
readformsecurityfix2
rebuild_memberlist_order
register_bugfix
register_lowercase
reply-button
report_to_mod_13
search_color_options_sp1
search_new
search_update
second_emailadress
security_fix
show_rules
show_stats_on_top
smileys_order_change
speed_boost
split_splice_1beta
sticky_topics_grouping
sum_cut_off_15sp1
temporary_ban
timelock_10
ubbc
up_and_down
user_ip_fix
YaBBC
yams_402

As I can see, the current name in switchsmilies.txt  changes correctly - but the smilies from this folder are not displayed (still the default ones).

cu Gekko
  
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 #5 - Apr 23rd, 2004 at 2:53pm
Print Post  
Maybe you should empty your browser cache...
  

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



Posts: 231
Joined: Aug 21st, 2001
Gender: Male
Re: Switch Smilies
Reply #6 - Apr 24th, 2004 at 10:58am
Print Post  
Nope - browser cache is empty and still the same...
  
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 #7 - Apr 24th, 2004 at 12:02pm
Print Post  
ok then maybe it's because of the file attributes (no write permission on the image files). open your Subs.pl and look for
Code
Select All
copy("$facesdir/../$name/$file", "$facesdir/../$file"); 


and replace it with
Code
Select All
copy("$facesdir/../$name/$file", "$facesdir/../$file") || &fatal_error("unable to copy $facesdir/../$name/$file to $facesdir/../$file"); 


that should display an error if something went wrong when copying the new smilies. Tell me if you get any error when using this modification.
  

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



Posts: 231
Joined: Aug 21st, 2001
Gender: Male
Re: Switch Smilies
Reply #8 - Apr 24th, 2004 at 12:20pm
Print Post  
Nope - this is not the problem. Found the mistake *lol* - "Add more smilies 3" stores the smilies not in YaBBImages but in YaBBImages/smilies. Otherwise the listing of the smilies in admin center will list all pictures and smilies stored in YaBBImages.

Storing the smilies in YaBBImages/smilies you have to create 2 new subdirectories lets say smilies_easter and smilies_default. Then you have to change

Code
Select All
copy("$facesdir/../$name/$file", "$facesdir/../$file"); 



to

Code
Select All
copy("$facesdir/../$name/$file", "$facesdir/../smilies/$file"); 



Hope this is correct.

cu Gekko
  
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 #9 - Apr 24th, 2004 at 12:52pm
Print Post  
can you tell me if your suggestion worked? If so I will make the mod smilies-compatible with your code Smiley

EDIT:
Here is how I would implement it:

Code
Select All
<search for>
		copy("$facesdir/../$name/$file", "$facesdir/../$file");
</search for>

<replace>
		$dest = "$facesdir/../$name/$file";
		if (-e "$vardir/Smilies.txt") {
			$target = "$facesdir/../smilies/$file";
		} else {
			$target = "$facesdir/../$file";
		}
		copy($dest, $target) || &fatal_error("Unable to copy $dest to $target");
</replace> 

  

The Administrator.
Back to top
WWW  
IP Logged
 
Dam Yankee
God Member
*****
Offline



Posts: 1538
Location: Maryville
Joined: Jun 13th, 2003
Gender: Female
Re: Switch Smilies
Reply #10 - Apr 27th, 2004 at 6:27pm
Print Post  
Just letting you know, I've had the smilies change several times since I installed your mod.  It works perfectly every time.   Grin
  
Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Switch Smilies
Reply #11 - May 21st, 2004 at 3:18pm
Print Post  
Alright I think we can mark this stable. Btw I added the code snip above to the final version of this mod, so now it's add more smilies mod-compatible.
  

The Administrator.
Back to top
WWW  
IP Logged
 
Captain_N
Guest


Re: Switch Smilies
Reply #12 - May 23rd, 2004 at 2:25am
Print Post  
Hrm. This is an excellent mod and one that I had wished for for quite a long time... but I have one request on it if you might be so kind to consider it: Might you consider making it possible to set it so that it could also have user-dependant smilies? If a user $user has folder /smilies/$user existing, basically, then use those smilies in that user's posts instead of default.

That would make a switch smilies mod from spiffy to awesomely indespensible.
  
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 #13 - May 23rd, 2004 at 12:50pm
Print Post  
So the user specific smilies would overwrite the timeframe-dependend smilies?
  

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


Only dead fish swim with
the river!

Posts: 129
Location: World metropolis Opladen
Joined: Jun 4th, 2003
Gender: Male
Re: Switch Smilies
Reply #14 - Oct 1st, 2004 at 2:20pm
Print Post  
@Michael Prager:
Quote:
An Error Has Occured!

Unable to copy http://www.MaD-DIDI.net/yabb/images/../smilies_normal/. to ../../yabb/images/avatars/../smilies/.



Sorry, my English is very bad - Im speak German!

Warum schreibt der /../ dazwischen ???
Und warum geht er nach "avatars" und dann wieder zurück beim Ziel ???

Wäre schön wenn Du mir sagen kannst was dort schief gelaufen ist! - DANKE!
  


Envy must earn oneself one - one gets compassion in vain!
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send TopicPrint