Get started with PHP-Fusion

Start a New Thread

Users Participated

  • NetriX
    Post made: 3
  • Rudios
    Post made: 6

  1. PHP-Fusion Support Forums
  2. AddonDB
  3. Official releases [Panels]

Top Weblinks

Support for Panels in the AddonDB

8 Replies 3,754 Views Last Updated on 2 years ago

NetriX


Moderator

#1

Posted 2 years ago

www.php-fusion.co.uk/infusions/addondb/img/screenshots/1017.jpg


Display the top 10 weblinks in order of popularity in a panel.

Features jQuery effect.

-- View this Addon --

Posts: 548

Joined: 22/09/2007

Rudios


Member

#2

Posted 2 years ago

Great Addon, unfortunately my links are much too long to list in a panel. Many people will enjoy. Anyway, thank you, appreciated!

Posts: 66

Joined: 01/09/2014

NetriX


Moderator

#3

Posted 2 years ago

Fusion has a trimlink function.

Code Gist: Download source  

trimlink(yourLink, 32); // 32 characters


You can trim anything. ;)

Posts: 548

Joined: 22/09/2007

Rudios


Member

#4

Posted 2 years ago

I'll have a look on this. Also, can always make it a center panel. Thanks.

Posts: 66

Joined: 01/09/2014

Rudios


Member

#5

Posted 2 years ago

Fusion has a trimlink function.

Code Gist: Download source  

trimlink(yourLink, 32); // 32 characters


You can trim anything. ;)
- by NetriX


Great! Now I need to know how to open a link in a new window, if that is possible?
Was what I was looking for, thanks! :G

Posts: 66

Joined: 01/09/2014

NetriX


Moderator

#6

Posted 2 years ago

Alter with target="_blank"

Line 70 - /infusions/weblinks_top10_panel/weblinks_top10_panel.php

Code Gist: Download source  

echo '<li><a href="'.BASEDIR.'weblinks.php?weblink_id='.$data['weblink_id'].'" class="masterTooltip" target="_blank" title="'.$weblink_description.$data['weblink_url'].'">'.trimlink($data['weblink_name'], 23)."</a>&nbsp;&#40;".$data['weblink_count']."&#41;".'</li>';

Posts: 548

Joined: 22/09/2007

Rudios


Member

#7

Posted 2 years ago

Works great! Thanks!

Posts: 66

Joined: 01/09/2014

Rudios


Member

#8

Posted 2 years ago

Would it be possible to change the "top 10 weblinks" panel title in "top 10 weblinks from ++total weblinks code here++ weblinks"?
And if so what should i change/insert in the panel code?

Posts: 66

Joined: 01/09/2014

Rudios


Member

#9

Posted 2 years ago

This seems to be working:

$weblinks_rows = dbcount("(weblink_id)", DB_WEBLINKS,""Wink;
echo "Total Web Links = <b>".$weblinks_rows." </b>\n";

Posts: 66

Joined: 01/09/2014

Jump to Forum:
6 users are online
0 member and 6 guests