MyBB Community Forums

Full Version: on/off/offlock, altonoff with external links?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm on a hosted forum service (runbb.com) and have no access to my forums image directory/folders/files (unless I contact my host and ask him to do this for me). I changed my theme's on/off/offlock images at the bottom of the theme - but I don't know how to change the template/s for altonoff with my external links. How do I do it?
(2014-05-26, 07:19 PM)hiiru Wrote: [ -> ]I'm on a hosted forum service (runbb.com) and have no access to my forums image directory/folders/files (unless I contact my host and ask him to do this for me). I changed my theme's on/off/offlock images at the bottom of the theme - but I don't know how to change the template/s for altonoff with my external links. How do I do it?

Provide me a picture of what your asking and I'll tell you right away. I don't know what the alton stuff is xD well I probably do but no clue what the words are..

Also I would strongly suggest purchasing your own server, or using a free one. Don't use 000webhost if you choose this option..

I really liked zymics free webhosting for mybb.
(2014-05-26, 07:36 PM)Ace700 Wrote: [ -> ]
(2014-05-26, 07:19 PM)hiiru Wrote: [ -> ]I'm on a hosted forum service (runbb.com) and have no access to my forums image directory/folders/files (unless I contact my host and ask him to do this for me). I changed my theme's on/off/offlock images at the bottom of the theme - but I don't know how to change the template/s for altonoff with my external links. How do I do it?

Provide me a picture of what your asking and I'll tell you right away. I don't know what the alton stuff is xD well I probably do but no clue what the words are..

Also I would strongly suggest purchasing your own server, or using a free one. Don't use 000webhost if you choose this option..

I really liked zymics free webhosting for mybb.

[attachment=31655]

The code below is what I need to know how to modify/change.

Code from: forumbit_depth2_forum

<tr>
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td>
<td class="{$bgcolor}" valign="top">
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" valign="top" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>

The code below is what I already changed by adding the links, which works as shown in the picture.

Code from: index template of the theme I'm editing.

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	lang.no_new_posts = "{$lang->no_new_posts}";
	lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
{$forums}
{$boardstats}

<dl class="forum_legend smalltext">
	<dt><img src="http://i.imgur.com/CepNRrq.png" alt="{$lang->new_posts}" title="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
	<dd>{$lang->new_posts}</dd>

	<dt><img src="http://i.imgur.com/GpOLzbN.png" alt="{$lang->no_new_posts}" title="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
	<dd>{$lang->no_new_posts}</dd>

	<dt><img src="http://i.imgur.com/Sc728PW.png" alt="{$lang->forum_locked}" title="{$lang->forum_locked}" style="vertical-align: middle;" /></dt>
	<dd>{$lang->forum_locked}</dd>
</dl>
<br style="clear: both" />
{$footer}
</body>
</html>
Look for this below and replace it in:
forumbit_depth2_forum
forumbit_depth2_cat
{$theme['imgdir']}/{$lightbulb['folder']}.gif

Should look like:
<img src="myimg.png" alt="alternate stuff" title="give it a title?" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />
(2014-05-26, 08:22 PM)Ace700 Wrote: [ -> ]Oh okay I see now:

Open up:
forumbit_depth2_forum
&
forumbit_depth2_cat
Look for this below V
{$theme['imgdir']}/{$lightbulb['folder']}.gif
Put url there and done.

Look for this below and replace it in:
forumbit_depth2_forum
forumbit_depth2_cat
{$theme['imgdir']}/{$lightbulb['folder']}.gif

Should look like:
<img src="myimg.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" />

I have three different url's for the three different functions (on, off and offlock). As I understand the code you said to replace is a folder directory for the folder where the original three images are in.

If I replace it with one of the url's it'll change the icon to that one only and won't alternate between new posts, no new posts.
Isn't that what your trying to do? You're trying to change them?
I need it to alternate between the green (new posts) and gray (no new posts). It won't do that if I replace the code with a link to just one of the new icons. Putting the url will change the icon, but it'll show that one icon only for both unread and read posts.
The code posted by Ace700 is half correct.

The name of the image is created with this variable: {$lightbulb['folder']}

Depending on the status of the variable, the image will be called on, off or offlock

so your template should be


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

with three images in the path - on.gif , off.gif , offlock.gif
(2014-05-27, 03:48 AM)Leefish Wrote: [ -> ]The code posted by Ace700 is half correct.

The name of the image is created with this variable: {$lightbulb['folder']}

Depending on the status of the variable, the image will be called on, off or offlock

so your template should be


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

with three images in the path - on.gif , off.gif , offlock.gif

I couldn't get it to work. I tried imgur folder link as well as dropbox folder link.

[attachment=31657]
You have to link to the actual file, can you provide the url to the files you are trying to link to?
Pages: 1 2