News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Visual Warning Mod

Started by xenovanis, November 06, 2005, 01:39:15 AM

Previous topic - Next topic

Bonk

#40
This mod only modifies the default theme.

To make it work with other themes, read through the .mod file in the mod and make the same changes to the theme you are using. That is what I had to do to get it to work with the pure_dark theme.

(search the .mod file for instances of "template.php" and make the same additions to the theme you are using as it adds to the default theme.)

You might want to check your forum on the default theme first to make sure it is working there first.

stryker69

well im just lost so i guess i wont be useing this mod.

thank you

desistyle

well i installed this mod and everything but i dont see the warn thing on 7dana theme but as soon i switch back to default theme its there can u plz help me with this can u put this mod in 7dana theme too plz plz

xenovanis

In Post.template.php of the 7dana theme find this line (or something similar):


if ($context['can_post_attachment'])


replace with;

if (isset($context['warning']))
echo'
<tr>
<td align="center" colspan="2">
<font size="2">' . $txt['visual_postmod_appear'] . '</font>
</td>
</tr>';
elseif ($context['can_post_attachment'])


How do I modify files?
"Insanity: doing the same thing over and over again and expecting different results."

desistyle

Quote from: xenovanis on November 19, 2005, 08:40:46 AM
In Post.template.php of the 7dana theme find this line (or something similar):


if ($context['can_post_attachment'])


replace with;

if (isset($context['warning']))
echo'
<tr>
<td align="center" colspan="2">
<font size="2">' . $txt['visual_postmod_appear'] . '</font>
</td>
</tr>';
elseif ($context['can_post_attachment'])


How do I modify files?

Sir Sorry to disturb u but it does not have post.template.php it has only these files

   Display.template.php   
   
   
   Help.template.php   

   
   index.php   

   index.template.php   

xenovanis

Sorry for that. Make these changes to your 7dana files. Remember, it could look a little different for this theme.

index.template.php

Code (search for) Select

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '</b><br />';


Code (add after) Select

if (isset($context['user']['awaiting_mod']))
echo '<br />' . $context['user']['awaiting_mod'];


Display.template.php

Code (search for) Select

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>';


Code (add after) Select

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>';



Code (search for) Select

if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group'], '<br />';


Code (add after) Select

if (isset($message['member']['warning']['link']) && $message['member']['warning']['link'] != '')
echo'
', $message['member']['warning']['link'];
"Insanity: doing the same thing over and over again and expecting different results."

Kindred

Just as a note, Stryker...

nealry ALL mods will only modify the default theme.  It's the nature of the beast.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

desistyle

Quote from: xenovanis on November 19, 2005, 06:39:11 PM
Sorry for that. Make these changes to your 7dana files. Remember, it could look a little different for this theme.

index.template.php

Code (search for) Select

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '</b><br />';


Code (add after) Select

if (isset($context['user']['awaiting_mod']))
echo '<br />' . $context['user']['awaiting_mod'];


Display.template.php

Code (search for) Select

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>';


Code (add after) Select

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>';



Code (search for) Select

if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group'], '<br />';


Code (add after) Select

if (isset($message['member']['warning']['link']) && $message['member']['warning']['link'] != '')
echo'
', $message['member']['warning']['link'];



Wow dude u rock u are simply the bestttttttttt... thanks for helping me out


xenovanis

Quote from: ArkServer on November 20, 2005, 07:43:42 PM
unable to load main template
1.1rc1 juno theme from bloc
http://arkserver.servehttp.com/forum/index.php

Could be due to a problem with the packagemanager. Try uploading the file VisualWarning.template.php to your /Themes/default directory and the file VisualWarning11.php to your /Sources directory. Also, make sure you make the changes as explained in the file VisualWarning_SMF11R1.mod to your themefiles.
"Insanity: doing the same thing over and over again and expecting different results."

stryker69

#50
Quote from: xenovanis on November 19, 2005, 06:39:11 PM
Sorry for that. Make these changes to your 7dana files. Remember, it could look a little different for this theme.

index.template.php

Code (search for) Select

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '</b><br />';


Code (add after) Select

if (isset($context['user']['awaiting_mod']))
echo '<br />' . $context['user']['awaiting_mod'];


Display.template.php

Code (search for) Select

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>';


Code (add after) Select

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>';



Code (search for) Select

if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group'], '<br />';


Code (add after) Select

if (isset($message['member']['warning']['link']) && $message['member']['warning']['link'] != '')
echo'
', $message['member']['warning']['link'];




thank you so much this is what i was asking for....now only one more question for you

how do i change the button? to match my theme...

i already have one but which one doi replace? does anyone know.

plus i am getting this when i use the warn button....

Unable to load the 'add_warning' template.

xenovanis

Name your button im_visualw.gif and upload it to your Themes/your_theme*/images/english directory, where your_theme is your custom theme. If you have any other languages installed, upload the button to these directories as well.

Quote from: stryker69 on November 21, 2005, 08:31:32 AM
plus i am getting this when i use the warn button....

Unable to load the 'add_warning' template.

Upload the file VisualWarning.template.php to your /Themes/default directory.

"Insanity: doing the same thing over and over again and expecting different results."

ArkServer

1 more question, can a moderator warn user? if not can you tell me how? i liek this mod a lot and thanks for the help!

xenovanis

Quote from: ArkServer on November 21, 2005, 11:13:46 AM
1 more question, can a moderator warn user? if not can you tell me how? i liek this mod a lot and thanks for the help!

Yes, it's a permission.
"Insanity: doing the same thing over and over again and expecting different results."

stryker69

thank you xenovanis you are one of the most helpfull people on here. keep up the good work....

props to you.

ArkServer

Quote from: stryker69 on November 21, 2005, 07:50:10 PM
thank you xenovanis you are one of the most helpfull people on here. keep up the good work....

props to you.

Agree, gj! all my problems are solved :)

bluesyrio

Hi,

I'm getting this error:

QuoteFatal error: Call to undefined function: autowarn() in /home/exaequo/public_html/forum/index.php on line 151

because of the mods new data in index.php. What should I do?

If I remove it, the mod stops working, of course.

It also happened to me that the package manager, somehow, installed it twice and I had to do uninstall to remove the double "entrances". But now if I want to remove the mod totally, I have to do file by file. :(

Anyway, the plan is to use the mod and not remove it, so if you could help, I would really appreciate it.


xenovanis

The easiest way to completely remove it is uploading all files from the updatepackage again. After that yo can install the mod again. Unfortunately, this will remove any other installed mods as well.
"Insanity: doing the same thing over and over again and expecting different results."

bluesyrio

Thanks for your reply.

The problem is not the mod installed twice, cause I managed to remove one of them nor that I have to remove manually or upload fresh files, if I want it gone. :)

I don't want to go through this trouble, if I can correct what causes the error in index.php. The strangest thing is that after the mod was successfully installed (and that includes the removal of the second installation and thus any double information) the mod worked perfectly. It was only 24h later that this error in index.php appeared. ???

b0bby

#59
When i installed this mod on my SMF 1.1 RC1 using package manager i got couple of errors. Can you please tell me how to fix them?



and when i try to warn someone i get this error:

Advertisement: