TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,853
  • Total Topics: 21,290
  • Online today: 1,590
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 177
  • Total: 177

making visual warning mod work (?)

Started by Moocat, August 27, 2005, 08:28:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Moocat

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

IchBin

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.

Moocat

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.

IchBin

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

Moocat

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

Moocat

thanks for the suggestion tho : \ i'll keep looking into it .

IchBin

I'll see if I can't look at the mod to see what you're talking about.

IchBin

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


Moocat

sweet bro, thanks for the help, i'll try that. i'll let ya know if it works in a little bit.... :)

Moocat

#9
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!!!

This website is proudly hosted on Crocweb Cloud Website Hosting.