1 (edited by kierownik 2007-04-21 12:02)

Topic: links with category v2.0.0

##
##        Mod title:  Links with category's
##
##      Mod version:  1.1.2
##   Works on PunBB:  1.2.14
##     Release date:
##           Author:  daniel rokven (rokven [at] gmail.com / http://kierownik.nl)
##
##      Description:  This will add a page with links and category's, something like a startpage
##                    Demo at http://kierownik.nl/Links.php
##
##  Difference with
## previous version:  see changelog
##
##   Affected files:  header.php
##                    style/yourstyle/yourstyle.css
##
##       Affects DB:  yes, add's 3 options to the config table and create's 2 new tables
##                    to hold the links and category's
##
##            Notes:
##
##       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.
##
################################################################################
## CHANGELOG:
## 1.1.2 : Fixed bug with guest posting link when no debug info, thanks to dirtybobby
##         that found that out :) and fixed div id="links" in AP_Links_with_category.php
##         that was also defined in links.php and the page looked weird.
## 1.1.1 : Put a div arround the category's so that you can style it much easier
## 1.1.0 : fixed bug when inserting ' in links or category
## 1.0.1 : Moved the style used in Links.php to the css file
## 1.0.0 : initial release 
################################################################################

This plugin will add a page like a startpage to your punbb

project link: http://www.punres.org/viewtopic.php?id=2531

new version(2.0.0) is being developed at this moment. more details at http://kierownik.nl

Mod support is on PunRes or on my own website smile

Re: links with category v2.0.0

Head Up on the upcoming release of V3.0.0

PunRes topic http://www.punres.org/viewtopic.php?pid=15693#p15693

Front plugin
http://i147.photobucket.com/albums/r319/kierownik/Mod%20Links%20With%20Category/V3/th_previewlinkswithcategoryv3.jpg

Add category
http://i147.photobucket.com/albums/r319/kierownik/Mod%20Links%20With%20Category/V3/th_previewlinkswithcategoryv3addcatego.jpg

Edit category
http://i147.photobucket.com/albums/r319/kierownik/Mod%20Links%20With%20Category/V3/th_previewlinkswithcategoryv3editcateg.jpg

Add Link
http://i147.photobucket.com/albums/r319/kierownik/Mod%20Links%20With%20Category/V3/th_previewlinkswithcategoryv3addlink.jpg

Edit link
http://i147.photobucket.com/albums/r319/kierownik/Mod%20Links%20With%20Category/V3/th_previewlinkswithcategoryv3editlink.jpg

statistics
http://i147.photobucket.com/albums/r319/kierownik/Mod%20Links%20With%20Category/V3/th_previewlinkswithcategoryv3stats.jpg

In this version there are the next things:

* & will be changed into a &.
* You can have Link-hits.
* You can place small icons behind the links like, tip or hot.
* You can Un-install the whole thing wink.
*Option to reset the link-hits.
*Add link
*Edit link
*Add category
*Edit category
*you can move the category's up and down
*You can move the category's from one column to another
*You can let other people insert links, but if you want to review them first before the are visible it can
*Added a php page where you can see what icons are present

hmm cannot think of anything else, is someone has a good idea that they would like to see in this mod, let me know.
Sub-categoy's are not done.

And I need one beta-tester that is good in php to see if I did not leave any sql-injections in the mod.

Greetings kierownik

Re: links with category v2.0.0

nobody has any ideas sad
And no beta teste sad

Re: links with category v2.0.0

Some ideas:
- Specify icon image for each category
- Specify position order of links
- Allow the owner's link to see stats

Re: links with category v2.0.0

qubertman wrote:

Some ideas:
- Specify icon image for each category
- Specify position order of links
- Allow the owner's link to see stats

1. hmm, good idea
2. another good idea
3. what owner, you mean the one that submited the link?

Re: links with category v2.0.0

kierownik wrote:

3. what owner, you mean the one that submited the link?

Yes or a unique URL for each link to display the # of hits.

Re: links with category v2.0.0

I already have made is to that the administrator can see the number of hits behind the links, but not the one that has submited the link, that would be to much i think.
Maby a seperate page where everyone can see the link-hits?!

8 (edited by qubertman 2007-04-14 15:03)

Re: links with category v2.0.0

kierownik wrote:

Maby a seperate page where everyone can see the link-hits?!

Yes.

More ideas:
- Duplicate a link and assign it to another category
- Specify text for the Title attribute of link
- Specify sort for each category (alphabetical, last added, # of hits (descending))
- Specify groups that can see each category

9

Re: links with category v2.0.0

i agree with the group permissions smile ncie idea

10

Re: links with category v2.0.0

And please, no multiple expensive SELECT * queries in links.php, like those at lines 218-225:

    $query = $db->query('SELECT
                          *
                        FROM 
                          `'.$db->prefix.'links_category`
                        WHERE
                          `column` = "'.$i.'"
                        ORDER BY 
                          `height`

and also similar SELECT * queries at lines 237-247, 271-276, etc.

These multiple SELECT * queries makes your app run slower, and violate 'MySQL rule #1: Select as little data as possible'.

Nice tips on optimizing MySQL: http://www.linuxformat.co.uk/wiki/index … QL_queries

Re: links with category v2.0.0

sirena wrote:

And please, no multiple expensive SELECT * queries in links.php, like those at lines 218-225:

and also similar SELECT * queries at lines 237-247, 271-276, etc.

These multiple SELECT * queries makes your app run slower, and violate 'MySQL rule #1: Select as little data as possible'.

Nice tips on optimizing MySQL: http://www.linuxformat.co.uk/wiki/index … QL_queries

I will try to set up a forum at my computer and then do a benchmark to see the difference, i am curious to see what the difference is smile

qubertman wrote:

Yes.

More ideas:
- Duplicate a link and assign it to another category
- Specify text for the Title attribute of link
- Specify sort for each category (alphabetical, last added, # of hits (descending))
- Specify groups that can see each category

1- hmm, good idea, have to take a look at that.
2- very good idea, did not think of that one.
3- have to take a look at that one.
4- not sure how to go about it, and why?

Re: links with category v2.0.0

kierownik wrote:

4- not sure how to go about it, and why?

Checkout the Forums option under Administration to see how it is done.

You may only want to display certain categories to moderators, different categories to members and different categories to guests.

Re: links with category v2.0.0

qubertman wrote:
kierownik wrote:

4- not sure how to go about it, and why?

Checkout the Forums option under Administration to see how it is done.

You may only want to display certain categories to moderators, different categories to members and different categories to guests.

I planned it that it would be a public page where everyone could share links etc. they are only links to other site's, maby i will look into that one in the next version i will have to see how it goes.

but how do you like the look now, when you look at the printscreens?!

Re: links with category v2.0.0

kierownik wrote:

but how do you like the look now, when you look at the printscreens?!

Very impressive!!!

Re: links with category v2.0.0

qubertman wrote:
kierownik wrote:

but how do you like the look now, when you look at the printscreens?!

Very impressive!!!

do you know alot of php and security, would you want to beta test it for xss, and maby some other improvements, would not take long if i am finished?

Re: links with category v2.0.0

Unfortunately, I don't. I can beta test as an end user, but not what you are looking for. Sorry.

Re: links with category v2.0.0

Got the the following message in Links.php and the admin plugin: "Parse error: syntax error, unexpected $end"

Links.php - to fix, change <? to <?php

line 202:
<label for="mandatory"><? echo '*<strong>'.$lang_links['mandatory'].'</strong>'; ?></label>

line 267:
  <?
  // look here if the webmaster wants the footer
 
 
Plugin - to fix, change <? to <?php

line 858:
<?
  } // end links not shown

Re: links with category v2.0.0

I checked the Links.php V2.0.0 and i did find the one by mandatory but i cannot find the rest, I will look out for it, thanks

Re: links with category v2.0.0

More ideas:

- # of links after the category name; for example, Software (10)
- specify link expiration date
- in addition to resetting the hit count, be able to edit the hit count

Re: links with category v2.0.0

http://www.punres.org/viewtopic.php?pid=15871#p15871