MyBB Community Forums

Full Version: Turn Forum Status Icons/Images Into Actual Link
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Yes Mike, I know all about http requests - its why my own site theme is almost totally empty of images (gotta have a logo and avatars...) . Toungue

Can you be totally clear what you want? You want people to click on the icon to go to the forum. On arrival at the forum they decide to read none/only some of the unread posts and instead return to index. The forum should still be showing as not read.Correct?
(2014-05-21, 02:58 AM)Leefish Wrote: [ -> ]Yes Mike, I know all about http requests - its why my own site theme is almost totally empty of images (gotta have a logo and avatars...) . Toungue

Can you be totally clear what you want? You want people to click on the icon to go to the forum. On arrival at the forum they decide to read none/only some of the unread posts and instead return to index. The forum should still be showing as not read.Correct?

Well, if you look at my site: http://www.theattorneyforums.com I'd like each of those Flags to be clickable (active/live link to open forums). For instance, someone could click on the Flag image of Alabama versus having to click the word Alabama.

And I'd actually just like it to Mark as Read for the ones that've been read, ya know? Thanks again Leefish! Smile
so basically you dont want the ajax read? The function where if you click on the forum icon it marks it as read? In that case just wrap the img src in a href. Look in the forum bit templates - forumbit_depth2_forum

<a href="{$forum_url}" class="icon-circle-arrow-right">YOUR IMAGE</a>
(2014-05-21, 03:54 AM)Leefish Wrote: [ -> ]so basically you dont want the ajax read? The function where if you click on the forum icon it marks it as read? In that case just wrap the img src in a href. Look in the forum bit templates - forumbit_depth2_forum

<a href="{$forum_url}" class="icon-circle-arrow-right">YOUR IMAGE</a>

Hi Leefish, thank you! But not really sure how I'd do that.

My forumbit_depth2_forum reads:

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="6">
<div class="expcolimage"><img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>
<div><strong><a href="{$forum_url}">{$forum['name']}</a></strong><br /><div class="smalltext">{$forum['description']}</div></div>
</td>
</tr>
</thead>
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
<tr>
<td class="tcat" colspan="3"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
<td class="tcat" width="200" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$sub_forums}
</tbody>
</table>
<br />


But each image is different. I just did them like: 1.png, 2.png, 3.png, 4.png etc, etc..


I'm assuming that with this:

<a href="{$forum_url}" class="icon-circle-arrow-right">YOUR IMAGE</a>

I'd add it like:

<a href="{$forum_url}" class="icon-circle-arrow-right">1.png</a>
<a href="{$forum_url}" class="icon-circle-arrow-right">2.png</a>
<a href="{$forum_url}" class="icon-circle-arrow-right">3.png</a>
<a href="{$forum_url}" class="icon-circle-arrow-right">4.png</a>

Etc., Etc.??

If so, where would I add it? If not, which is probably along the lines I'm on, how would I do it?

Again, thank you so much Leefish! Smile
I actually know nothing of JavaScript so I can help you with this, I was just throwing an idea.

Leefish may be able to help you better, there is no fish like she is Big Grin
The way to do this is actually to use a css sprite and build it in your css. I just did it over on Shavenook.com. (paid job)

You have a lot of forums, so I see why you worry about http requests. You could just sprite the whole lot and load one image for on, another for off. There is a thread about it here on MyBB.

http://community.mybb.com/thread-134342.html
(2014-05-21, 04:53 AM)Leefish Wrote: [ -> ]The way to do this is actually to use a css sprite and build it in your css. I just did it over on Shavenook.com. (paid job)

You have a lot of forums, so I see why you worry about http requests. You could just sprite the whole lot and load one image for on, another for off. There is a thread about it here on MyBB.

http://community.mybb.com/thread-134342.html


I'll look into that now. Thank you Leefish!
Smile
Pages: 1 2