1 (edited by Programming-Designs 2005-11-28 01:47)

Topic: MOD: Post/Reply Topic Links Visible to Guests

##
##
##        Mod title:  Display Post/Reply topic for guests
##
##      Mod version:  1.0.0
##   Works on PunBB:  1.2.x
##     Release date:  2005-11-27
##           Author:  Daniel Moxon (http://programming-designs.com)
##
##      Description:  Display Post new topic / Post reply links for guests
##      and direct them to the login page instead of displaying nothing.
##
##   Affected files:  viewforum.php
##                    viewtopic.php
##
##       Affects DB:  No
##
##
##       Notes: The usefulness of this is so that guests don't get confused and
##       will have the opportunity to login/register. If they login, it will automatically
##       redirect them to the page they were at previously. (This is by default.)
##     This mod should work on all releases but has only been tested on v1.2.10, is a 
##       very simple mod.
##
##     POLL USERS:  If you use the poll mod, you will need to replace the
##       text with alternate information. To find out what you the text with,
##     find the first "$post_link =" text in both viewforum.php and viewtopic.php
##       and copy the text until you reach the first semicolon ";"
##
##       This is essentially what the mod does, just with the original files
##       provided with PunBB.
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

==============================[ 1.     OPEN     ]========================

viewforum.php

=========================================================================
==============================[ 2.     FIND     ]========================

$post_link = '';

=========================================================================
==============================[ 3. REPLACE WITH ]========================

$post_link = "\t\t".'<p class="postlink conr"><a href="login.php">'.$lang_forum['Post topic'].'</a></p>'."\n";

=========================================================================
==============================[ 4.     OPEN     ]========================

viewtopic.php

=========================================================================
==============================[ 5.     FIND     ]========================

$post_link = ' ';

=========================================================================
==============================[ 6. REPLACE WITH ]========================

$post_link = '<a href="login.php">'.$lang_topic['Post reply'].'</a>';

=========================================================================
==============================[ 7. SAVE/UPLOAD  ]========================

Read the above, it contains the whole mod. Poll Mod users may have questions, if so feel free to ask. This is a very simple mod.

Re: MOD: Post/Reply Topic Links Visible to Guests

Excellent, just what I was looking for, and so simple I wish I had tried to do it myself smile