Umm yeah i'm kinda a noob at this php stuff. The problem I'm having is that Visual Warning Mod 1.2.6 (the one compatible with SMF 1.1 beta3 public) is installed on my forum. I can see its section in the admin panel, but the "Warn" button doesn't show up when I use the Helios Theme. I also have TP 0.6.5 Beta installed, so, I'm using the TinyPortal version of Helios. Can anyone tell me where to add code and what code to add to get the "warn" button to appear? Thanks! ;D
You need to open up the mod or xml file in the visual warning mod package to see the instructions. It tells you what code to add to what files. Instead of doing it to the default theme you need to do it to the helios theme.
i did that and still couldnt figure it out :(
the .mod file had nothing about a button, that i saw. i even searched for ".gif" in it, and the name of the button image. nothing showed up. btw, works fine on default theme.
That's because you have to make your own button and put it in the proper place in the theme folder.
You can go here to make a button for helios.
http://www.tinyportal.net/button-generator/helios.php
well first problem i see with that is that i don't even get a "no image" icon, you know the box with the X in it. so i have to assume that there isn't even code to call the image. i know it used to work on helios before i installed tinyportal.... :x
thanks for the suggestion tho : \ i'll keep looking into it .
I'll see if I can't look at the mod to see what you're talking about.
Here are the changes you need to make to both of these files in the helious theme. The images should show up after you do this. Just remember that the code your searching for will not look exactly the same because this is the helios theme and not the default theme.
<edit file>
$themedir/Display.template.php
</edit file>
<search for>
if ($message['can_remove'])
echo '
<a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete.gif" alt="' . $txt[121] . '" border="0" />' : $txt[31]), '</a>';
</search for>
<add after>
if ($context['can_warn'])
echo '
<a href="', $scripturl, '?action=warnadd;topic=', $context['current_topic'], ';start=', $context['start'], ';user=', $message['member']['id'], ';msg=', $message['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/im_visualw.gif" alt="' . $txt['visual_raise'] . '" border="0" />' : $txt['visual_warn']), '</a>';
</add after>
<search for>
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group'], '<br />';
</search for>
<add after>
if (isset($message['member']['warning']['link']) && $message['member']['warning']['link'] != '')
echo'
', $message['member']['warning']['link'];
</add after>
<edit file>
$themedir/index.template.php
</edit file>
<search for>
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<br />
<b>', $txt[616], '</b>';
</search for>
<add after>
if (isset($context['user']['awaiting_mod']))
echo '<br />' . $context['user']['awaiting_mod'];
</add after
sweet bro, thanks for the help, i'll try that. i'll let ya know if it works in a little bit.... :)
ok i tried it and i couldn't find anything similar to this in display.template.php
</add after>
<search for>
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group'], '<br />';
</search for>
<add after>
if (isset($message['member']['warning']['link']) && $message['member']['warning']['link'] != '')
echo'
', $message['member']['warning']['link'];
</add after>
knowing my luck, this is exactly what i need to make it all work. but between the <search for> tags i couldn't find anything specific from there. any techniques you would suggest to help me find it? thanks for all the help!!!
Look right unde this line m8.
// Show the member's primary group (like 'Administrator') if they have one.
schweet tyvm :P
EDIT: when i looked in display.template.php, i could not find that line you just posted. I am using the tinyportal version of helios. I went into display.template.php in the regular version of helios for 1.1 beta 3, and, lo and behold, i found that line. however, the tp version display.template.php doesnt have this line, so i assumed it was corrupt??? should i use the original file from the download?
No problem. Just remember sometimes when you're custom editing in different themes, the lines won't be the same. So you have to search for parts of the line.
i apologize, please see edit to last post... problem still isn't fixed
nevermind the edit and previous post. it seems like the file kept reverting to its old state for some really wierd reason... but i applied the modifications to display.template.php a few more time, and the button finally showed up! without ur help i never would have got there :P
tyvm :)
No problem Moocat. Glad you got it working, and you probably learned a few things along the way. :)
indeed :) tyvm