Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23

Thread: widgets

  1. #21
    Join Date
    Aug 2010
    Location
    NJ
    Posts
    4

    Default

    Thanks, this is what I was looking for!
    Quote Originally Posted by roymogg View Post
    Hi All,

    I put random links on the CMS homepage with this code which is a mod to the classifieds hack. Needs tidying up and it is work in progress and the thumshots do fail to turn up occasionally.

    PHP Code:
    $host 'localhost';
    $dbUser 'forum';
    $dbPass 'pass';
    $db 'your_forum';
    mysql_connect("$host""$dbUser""$dbPass") or die(mysql_error());
    mysql_select_db("$db") or die(mysql_error());

    ob_start();

    $result mysql_query("SELECT linkid,name,linkurl,catid,username FROM bf_adv_links ORDER BY rand() LIMIT 5" ) or die(mysql_error());

    while(
    $link mysql_fetch_array$result )) {

    print
    "<center>";
    print 
    "<a href=" $link['linkurl'] . " " "target=\"_blank\">" ."<img src=\"http://open.thumbshots.org/image.aspx?url=".$link['linkurl']." ""width=\"120\" height=\"90\" border=\"0\" />" "</a>";
    print 
    "<br />";
    print 
    $link['name'] . " listed by " $link['username'];
    print 
    "</center>";
    }

    $output .= ob_get_contents();
    ob_end_clean(); 
    but it works for me

    Cheers

    RoyMogg

  2. #22

    Default

    What I could really do with is a cms radom links widget with the random links being restricted to a group that have paid to be shown in this widget.

    Any ideas how this could be accomplished please?

    RoyMogg - should your code be added to a PHP Direct Execution widget? All I get is a blank page (even when I have removed bf_).

    Many thanks

  3. #23
    Join Date
    Nov 2007
    Location
    Nashville, Tennessee
    Posts
    249

    Thumbs up

    Quote Originally Posted by armchairproduct View Post
    What I could really do with is a cms radom links widget with the random links being restricted to a group that have paid to be shown in this widget.

    Any ideas how this could be accomplished please?

    RoyMogg - should your code be added to a PHP Direct Execution widget? All I get is a blank page (even when I have removed bf_).

    Many thanks
    I'd love to see that developed too! Maybe with an option to specify links, or pull them from a specific category... need to get vBa to my cms home page!

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Widgets on vbadvance page
    By wmlvb in forum Module & Modification Discussion & Requests
    Replies: 0
    Last Post: 09-13-2008, 11:00 AM
  2. How can I create module to show these widgets?
    By GentleOceanWind in forum "How Do I..." Questions
    Replies: 3
    Last Post: 04-30-2008, 12:06 PM
  3. weather and fox nfl widgets
    By StuntFactoryX in forum Add-On Modules (version 3.x & 2.x)
    Replies: 13
    Last Post: 12-12-2007, 02:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •