Topic: [Release] Links Plus 2.1

##
##
##        Mod title:  Links Plus
##
##      Mod version:  2.1
##     Works on PunBB:  1.2.15
##     Release date:  2007-06-26
##           Author:  eric235u (support@newmag.org)
##
##      Description:  This is a mod to display web links with categories and
##                    descriptions.
##
##     Affected files:  None.
##
##       Affects DB:  Yes.
##
##            Notes:  Requires MySQL.
##
##          Changes:  Admin is notified via email if new link is added.
##
##
##       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.
##
##

you can see a preview at http://newmag.org/forum/linksplus.php

you can download here http://www.punres.org/files.php?pid=413

Re: [Release] Links Plus 2.1

You're off a forum.

Re: [Release] Links Plus 2.1

crap, should it have been in mods?

Re: [Release] Links Plus 2.1

Moved smile

5

Re: [Release] Links Plus 2.1

eric235u wrote:

crap, should it have been in mods?

big_smile big_smile big_smile  PMSL. big_smile

Re: [Release] Links Plus 2.1

i will remember next time.  :-)  thanks.

Re: [Release] Links Plus 2.1

small "bug", the style reverts to the default board style when on mysite.com/linksplus.php and not the style i have chosen in my profile.

~James
FluxBB - Less is more

Re: [Release] Links Plus 2.1

Dr.Jeckyl wrote:

small "bug", the style reverts to the default board style when on mysite.com/linksplus.php and not the style i have chosen in my profile.

you're totally right.  i hadn't noticed that during testing as the default and profile themes were the same.  if i get a chance today or tomorrow i'll post a fix unless somebody beats me to it.

thanks for finding the bug!

Re: [Release] Links Plus 2.1

this should fix the problem.  i warn you, i'm pretty new at php but it seems to function properly.  please let me know if there's any other problems.  thanks!

replace linksplus.php with this:

<?php

/*

  This file isn't part of PunBB.  This file is part of 'linksplus'
  a web link modification for PunBB.

  PunBB is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

*/

// let's stay within punbb
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
require PUN_ROOT.'header.php';

// comment out after debugging
//error_reporting(E_ALL);

?>

<p>
<b>Welome to our Web Links Section.</b>  Members may submit links using the form below.  Please use a 
preexisting category unless absolutely necessary.  If you desire to browse our repository of weblinks 
click on a category below.
</p>

<form action="linksform.php" method="post">
 <p><b>Website Name:</b> <input type="text" name="name" /> 
 <b>URL:</b> <input type="text" name="link" /> 
 <b>Category:</b> <input type="text" name="category" /></p>
 <p><b>Description:</b> <TEXTAREA name="description" rows="2" cols="80" >
 Enter the website description here.</TEXTAREA></p>
 <input type="submit" />
</form>


<?php

echo '<p><p><b>Select a Category:</b></p></p>';

// list all categories
$table = $db->prefix.'linksplus';
$result = $db->query("SELECT DISTINCT category FROM $table 
    ORDER BY category");
    
$category_url = PUN_ROOT.'linksviewc.php?category=';  //how to list by category? get?

while ($row = $db->fetch_assoc($result)) {
    echo "<p><b><a href=" . $category_url.$row['category'] . "> ". $row['category'] ."</a></b></p>";
}


// let's stay within punbb
$footer_style = 'index';
require PUN_ROOT.'footer.php';

?>