News:

Wondering if this will always be free?  See why free is better.

Main Menu

Guest Registration Notification

Started by live627, June 18, 2010, 10:10:00 PM

Previous topic - Next topic

live627

Guest Registration Notification


Link to Mod || Author || Support Topic


The Guest Registration Notification mod displays a red, bordered box in the index as default. There are also options to display these boxes in the board index or above posts. Configure the mod through the admin control panel. This mod is compatible for both SMF 1.1.x and SMF 2.0.


  • Enable/disable option
  • Edittable content/title/display image
  • Supports BBC
  • Configurable to show in index (by default) also in board index and above posts
  • SMF 2 versions (above RC3) modifies template layers

Created by Anthony Calandra/Project Evolution - 2010.

Mick.

Very nice man, looks pretty good.   Congrats on the approval. ;)

ascaland

Thanks a lot my friend, im inclined to be working on more mods. Ive got a lot of inspiration and ideas. :)


ascaland

Heh, thanks guys. Your friendly feedback really motivates me.  O:)

IDunc

Very nice! Thanks for the great mods!


IDunc

Uh oh, test failure in /Themes/default/MessageIndex.template.php.

File is attached.


ascaland

Its because you have this,
global $context, $settings, $options, $scripturl, $modSettings, $txt, $user_info, $board_info;
In the template_main() function while the mod checks for,
global $context, $settings, $options, $scripturl, $modSettings, $txt;

Basically all you have to do is put, (lost some formatting)


if ($context['user']['is_guest'] && !empty($modSettings['enable_guest_notify']) && empty($modSettings['guest_notify_enable_boards'])
&& !empty($modSettings['guest_notify_contents']) && !empty($modSettings['guest_notify_title'])) {
echo '<div class="errorbox">';
echo (!empty($modSettings['guest_notify_img_path'])) ? '<img style="float: left; width: 2ex; font-size: 2em; color: red; padding-right: 5px;" src="' . $modSettings['guest_notify_img_path'] . '" title="" />'
: '<p class="alert">!!</p>';
echo '<h3>' ,$modSettings['guest_notify_title'], '</h3>
<p>', parse_bbc($modSettings['guest_notify_contents']), '</p>
</div>';
}

Below that line.

IDunc

#8
Thanks so much, works perfectly.


Alpay

#9
turkish translate

// Guest Registration Notify Modification
$txt['guest_notify'] = 'Ziyaretci Not Bildirimleri';
$txt['guest_notify_tab'] = 'Ziyaretci Not Bildirimleri';
$txt['enable_guest_notify'] = 'Ziyaretci Not Bildirimlerini Aktif Et';
$txt['guest_notify_img_path'] = 'Resimli Not için Resim Yolu';
$txt['guest_notify_title'] = 'Ziyaretcilerin Not Başlığı';
$txt['guest_notify_contents'] = 'Ziyaretci Not Bildirimi İçeriği';
$txt['guest_notify_enable_boards'] = 'Forum İndex inde Aktif et';
$txt['guest_notify_enable_posts'] = 'Konularda Aktif et';


ascaland


Bugo

Please save languages.xml to ANSI charset and paste turkish translation to separate file, with charset UCS-2 Little Endia.

Bugo


ascaland

Updated, hopefully I got it right this time...
Still a little new to this.

scooterhog

I'm getting this on 1.1.11:

Execute Modification     ./Themes/default/BoardIndex.template.php     Test failed

with these applied mods:

1.      Fix Session Verification for Polls      1.0   
2.    SMF Gallery Lite    2.1    
3.    Copyright & Footer Links | S-Ace    3.1
4.    Ad Managment    2.3.6.1
5.    Global Headers Footers    2.0
6.    AjaxChat Integration    3.2.1    
7.    Team Page    3.5.4    [ Apply Mod ] [ List Files ] [ Delete ]
8.    Animated_BBC_expando    1.0.0    
9.    Ultimate Profile    0.9.1    
10.    Auto Verification    1.0
11.    Hide Unused Profile Display Fields    1.0
12.    Search Focus Dropdown    1.44    
13.    Stop Spammer    2.3.7    
14.    Logo redirect    0.1

ascaland

Try this. Above,
//Display ads on the board index
if (function_exists("show_boardAds"))


Add,
if ($context['user']['is_guest'] && !empty($modSettings['guest_notify_contents']) && !empty($modSettings['guest_notify_title']) && !empty($modSettings['enable_guest_notify'])) {
echo '<div style="margin: 2ex; padding: 2ex; border: 2px dashed #cc3344; color: black; background-color: #ffe4e9;">';
echo (!empty($modSettings['guest_notify_img_path'])) ? '<img style="float: left; width: 2ex; font-size: 2em; color: red;" src="' . $modSettings['guest_notify_img_path'] . '" title="" />'
: '<div style="float: left; width: 2ex; font-size: 2em; color: red;">!!</div>';
echo '<b style="text-decoration: underline;">' ,$modSettings['guest_notify_title'], '</b><br />
<div style="padding-left: 6ex;">', parse_bbc($modSettings['guest_notify_contents']), '<br /></div>
</div>';
}

scooterhog

This is how the file was modified:

//Display ads on the board index
   if (function_exists("show_boardAds"))
      if ($context['user']['is_guest'] && !empty($modSettings['guest_notify_contents']) && !empty($modSettings['guest_notify_title']) && !empty($modSettings['enable_guest_notify'])) {
         echo '<div style="margin: 2ex; padding: 2ex; border: 2px dashed #cc3344; color: black; background-color: #ffe4e9;">';
            echo (!empty($modSettings['guest_notify_img_path'])) ? '<img style="float: left; width: 2ex; font-size: 2em; color: red;" src="' . $modSettings['guest_notify_img_path'] . '" title="" />'
               : '<div style="float: left; width: 2ex; font-size: 2em; color: red;">!!</div>';
            echo '<b style="text-decoration: underline;">' ,$modSettings['guest_notify_title'], '</b><br />
            <div style="padding-left: 6ex;">', parse_bbc($modSettings['guest_notify_contents']), '<br /></div>
         </div>';
     }
   {
      $ads = show_boardAds();
      if(!empty($ads))
         if($ads['type']==0)
            echo $ads['content'];
         else
            eval($ads['content']);
      unset($ads);
   }

Your code was added directly below the target line. I still get the error. I might have misunderstood your instructions. This is a great idea. Thanks for working with me.


ascaland

I have attached the fixed BoardIndex.template.php,

scooterhog

Same error with the BoardIndex.template file you provided.

ascaland

Ok I see, my modification checks to see if there is a tab before the comment in the BoardIndex file, which probably isnt the best idea. So here is the fix, but this would probably interfere with the uninstallation of the Ad Management mod (you can easily hardcode it out though).


Advertisement: