On and off individual image using Xthreads
#1 23-05-2012 
http://mybbhacks.zingaburga.com/showthre...448&page=1

I read the tutorial a couple times and this is what I get so far:

make a template_prefix_forumbit_depth2_forum per each forum (not sure if right) it'll contain this code:

Code:
<img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />

change the code below with the directory that contains two images for the individual forum.
Code:
{$theme['imgdir']}

I'm not sure if right, also what would be the next step? I always get lost with tutorials that are not step by step Undecided
zero_x, proud to be a member of LeeFish since Apr 2012.

0
#2 23-05-2012 
Ok, there are a lot of disadvantages to this approach. It requires you to make a separate forum bit template per forum using XThreads prefixes.

For what you want, use this code from ZB >>

Code:
<img src="{$theme['imgdir']}/forum{$forum['fid']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />

And have your images in:
/theme/images/forum1/on.gif
/theme/images/forum1/off.gif
/theme/images/forum2/on.gif
etc
...where the numbers refer to the forum ID. If you do this, you'll need an image for every single forum and don't need XThreads.
The site don't jive? PRESS F5 Flower

0
#3 24-05-2012 
Thanks alot fish! also u-rated replied me this
Quote:If you don't want to that, maybe you can try this way (the lightbulb image tag):

forumbit_depth2_forum
[HTML]
<img src="{$theme['imgdir']}/{$forum['fid']}_{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />
[/html]

Then upload forumid_on.gif, forumid_off.gif and forumid_offlock.gif to your theme's images folder.
For example for forum id = 2:
2_on.gif, 2_off.gif and 2_offlock.gif

I'm going to work on this right now.. Also need to finish my market forum people are already asking or stuff.

0
#4 24-05-2012 
Ok, looks good. Also, make sure all images are gifs or you will have to change the javascript as well.
The site don't jive? PRESS F5 Flower

0
#5 24-05-2012 
leefish;13299 Wrote:Ok, looks good. Also, make sure all images are gifs or you will have to change the javascript as well.

Damn it, i was doing the images and realized that .gif do not save opacity..... I'm going to need to modify the javascript i guess :/

[Image: YVdlu.gif]
[Image: MPVXP.png]

Can you even tell the difference? Tongue
zero_x, proud to be a member of LeeFish since Apr 2012.

0
#6 24-05-2012 
hmm, it is going to be a bit hard to tell. Maybe make the off a slightly lower opacity.
The site don't jive? PRESS F5 Flower

0
#7 24-05-2012 
damn this was so easy to do... I just need to now what js to edit, do you know? Or not necessary and just change .gif to .png on the code? *zero stops asking and starts testing

0
#8 24-05-2012 
zero_x;13302 Wrote:*zero stops asking and starts testing

Good lad

* leefish ruffles zero's hair
The site don't jive? PRESS F5 Flower

0
#9 24-05-2012 
leefish;13303 Wrote:
zero_x;13302 Wrote:*zero stops asking and starts testing

Good lad

* leefish ruffles zero's hair

I'm back !! wave haha did not work, gotta edit the js do I really have to go over all js? If you know wich it is you can tell me you know Rolleyes

*lezero feels ashamed.

EDIT: It worked..........
*zero hiding face on the ground
zero_x, proud to be a member of LeeFish since Apr 2012.

0
#10 24-05-2012 
well, we need to look at the page in something like firebug in firefox or dragonfly in Opera.

Then you need to be on your index page and hit Inspect Element. Then view the js called. I can tell you it is in general.js. You will need to copy general.js to your pc (from your ftp).

Then you can search for gif. it is in two places I think - about line 32 and again on line 261.

Just change gif to png.

It worked? Yay for you. Well done.
The site don't jive? PRESS F5 Flower

0


Sorry, that is a members only option