Results 1 to 5 of 5

Thread: Getting Thumbshots to show up in Links Module on vBadvanced CMPS

  1. #1

    Default Getting Thumbshots to show up in Links Module on vBadvanced CMPS

    And now for something completely different...

    On my site www.bonsainut.com I use a custom vBadvanced front page with custom modules, as well as a vBa Links Directory page that uses thumbshots.

    I know thumbshots has changed, and vBa Links has updated their code, and I have updated the vBa Links code on my site and now everything works fine on the Links page but NOT on the custom links module on the front page of the site.

    In other words - thumbshots show up just fine in the links directory, but the vBa front page module (which pulls content directly from the links directory) is only displaying a blank "thumbshots coming soon" image. It was working fine before thumbshots changed their code...

    Any help? Here is the code for the front page module that I am struggling with:

    PHP Code:
    <?php

    // ++=========================================================================++
    // The order you would like to pull the links in.
    // Enter 1 for newest, 2 for most viewed, 3 for most comments, 4 for highest rated, 5 for random
    $order 5;

    // Enter the number of links you would like to display here
    $limit 5;

    // Maximum characters of the links name before the rest will be replaced with '...'
    // Set this to 0 to disable it.
    $maxnamechars 0;

    // No further editing necessary
    switch($order)
    {
        case 
    2:
            
    $orderby 'views DESC';
            break;
        case 
    3:
            
    $orderby 'posts DESC';
            break;
        case 
    4:
            
    $votequery 'IF(votenum >= 0, votenum, 0) AS votenum, IF(votenum >= 0 AND votenum > 0, votetotal / votenum, 0) AS voteavg,';
            
    $orderby 'voteavg DESC, votenum DESC';
            break;
        case 
    5:
            
    $orderby 'rand() DESC';
            break;

        default:
            
    $orderby 'dateline DESC';
    }

    // Get private directories
    if ($catinfo unserialize($datastore['links_d_cache']))
    {
        
    $privcatids = array();
        foreach (
    $catinfo as $cats)
        {
            if (
    $cats['private'])
            {
                
    $privcatids[] = $cats['catid'];
            }
        }
        
    $privcats 'AND links.catid NOT IN (' implode(','$privcatids) . ')';
    }

    $getlinks $vbulletin->db->query("
            SELECT 
    $votequery links.*, links_categories.title
            FROM " 
    TABLE_PREFIX "adv_links AS links
            LEFT JOIN " 
    TABLE_PREFIX "adv_links_categories
              AS links_categories
              ON (links.catid = links_categories.catid)
            WHERE
              links.valid = 1
              AND links.open = 1
              
    $privcats
            ORDER BY 
    $orderby
            LIMIT 
    $limit
    "
    );

    while (
    $link $vbulletin->db->fetch_array($getlinks))
    {
        
    $link['catname'] = stripslashes($link['title']);
        
    $link['name'] = fetch_trimmed_title(stripslashes($link['name']), $maxnamechars);
        
    $link['username'] = stripslashes($link['username']);
        
    $link['date'] = vbdate($vbulletin->options['dateformat'], $link['dateline']);
        
    $link['time'] = vbdate($vbulletin->options['timeformat'], $link['dateline']);
        
    $link['posts'] = number_format($link['posts']);
        
    $link['replies'] = number_format($link['replies']);

        
    $getbgrow exec_switch_bg();
        
    $templater vB_Template::create('adv_portal_linkbits');
         
    $templater->register('link',$link);
        
    $linkbits .= $templater->render();

    }

    // ### Update the template to have the path qualified ###
    $linkbits str_replace(array('"showlink.php''"browselinks.php'), array('"' $vbulletin->options['vba_links_homeurl'] . '/showlink.php''"' $vbulletin->options['vba_links_homeurl'] . '/browselinks.php'), $linkbits);

    //$collapseobj_latestlinks = $vbcollapse['collapseobj_latestlinks'];
    //$collapseimg_latestlinks = $vbcollapse['collapseimg_latestlinks'];

    $templater vB_Template::create('adv_portal_latestlinks');
    $templater->register('linkbits'$linkbits);
    $home["$mods[modid]"]['content'] = $templater->render();

    ?>
    Last edited by BonsaiNut; 05-22-2013 at 12:47 PM.

  2. #2

    Default

    Bump for love? 8 months and I was hoping someone might have some ideas...

  3. #3

    Default

    Did you add the activation snippet code on the portal page too?

  4. #4
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    When I check your source code I see the image is pointing to a URL that shows this at the end:
    http://images.thumbshots.com/image.a...Vs1U%3d&v=1&w=[Width]&url=[URL]

    I'd suggest checking your adv_portal_linkbits template to see if it actually has this at the end of the URL:
    &w=[Width]&url=[URL]

    If so, try changing it to this:
    &w=120&url={vb:raw link.url}
    Frequently Asked Questions
    CMPS Users Manual

    For vBadvanced software assistance, please use the support forums.
    Unsolicted PMs, IMs, and email will not be responded to.
    If you have a non-software related question or problem with your account, please submit a support ticket.

  5. #5

    Default

    Quote Originally Posted by Brian View Post
    When I check your source code I see the image is pointing to a URL that shows this at the end:
    http://images.thumbshots.com/image.a...Vs1U%3d&v=1&w=[Width]&url=[URL]

    I'd suggest checking your adv_portal_linkbits template to see if it actually has this at the end of the URL:
    &w=[Width]&url=[URL]
    A belated thank you that is a year old Your note put me on the right track to resolve the issue. Your code doesn't work but it gave me the clue to come up with code that would. For anyone who stumbles into this thread, the code that I am using that works is:

    &w=[Width]&url=$link[linkurl]

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 10
    Last Post: 07-18-2013, 09:39 AM
  2. Using a module to show links
    By Capper5016 in forum "How Do I..." Questions
    Replies: 4
    Last Post: 02-20-2009, 08:06 PM
  3. vBadvanced Links Directory & vBadvanced CMPS
    By vBGJ in forum Pre-Sale Questions
    Replies: 3
    Last Post: 04-09-2006, 11:15 PM
  4. Show recent links in CMPS
    By Dusty in forum "How Do I..." Questions
    Replies: 1
    Last Post: 03-14-2006, 05:37 PM
  5. AdminCP - New Group vBadvanced CMPS don't show
    By =dark3zz= in forum Troubleshooting & Problems
    Replies: 2
    Last Post: 12-01-2005, 02:53 PM

Posting Permissions

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