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

Thread: Fake vBalinks as forum

  1. #21
    Senior Member
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default Re: Fake vBalinks as forum

    sorry if this was confusing to you

    Create a forum and point it to your links index
    Real useful and Cool vBulletin addons

  2. #22

    Default Re: Fake vBalinks as forum

    I added this to my forums but I wanted the individual categories to show instead of one to the complete links section (since my site is based around links). http://www.legendarythreads.net/forums/

    I'm concerned because I could not figure out a way to do this without repeating the code multiple times, this adds many queries per page load and I'm trying to lighten the query count. Is there a way to combine the code below into less queries?
    PHP Code:
            if ($forum['forumid'] == '18')
                    {
                    global 
    $db
                    
    $tot $db->query_first("SELECT COUNT(*) as count FROM " TABLE_PREFIX "adv_links WHERE catid = 17");
                    
    $link $db->query_first("SELECT linkid , name, posts, username, userid, dateline FROM " TABLE_PREFIX "adv_links WHERE catid = 17 ORDER BY linkid DESC");
                    
    $totpost $db->query_first("SELECT SUM(posts) as totpost FROM " TABLE_PREFIX "adv_links WHERE catid = 17");
                    
    $date vbdate($vbulletin->options['dateformat'], $link['dateline'], 1);
                    
    $time vbdate($vbulletin->options['timeformat'], $link['dateline']);        
                    
    $forum['lastpostinfo'] = '<div align="left" class="smallfont"><strong><a href="/showcase/showlink.php?do=showdetails&l='.$link[linkid].'">'.$link[name].'</a></strong><br />by <a href="member.php?find=lastposter&f='.$link[userid].'">'.$link[username].'</a><br /><span style="float:right;">'.$date.' '.$time.' <a href="/showcase/showlink.php?do=showdetails&l='.$link[linkid].'"><img src="http://www.legendarythreads.net/forums/smooth/buttons/lastpost.gif" border="0" alt="View showcase"></a></span></div>';
                    
    $forum['threadcount'] = $tot['count'];
                    
    $forum['replycount'] = $totpost['totpost'];
                    }

            if (
    $forum['forumid'] == '20')
                    {
                    global 
    $db
                    
    $tot $db->query_first("SELECT COUNT(*) as count FROM " TABLE_PREFIX "adv_links WHERE catid = 7");
                    
    $link $db->query_first("SELECT linkid , name, posts, username, userid, dateline FROM " TABLE_PREFIX "adv_links WHERE catid = 7 ORDER BY linkid DESC");
                    
    $totpost $db->query_first("SELECT SUM(posts) as totpost FROM " TABLE_PREFIX "adv_links WHERE catid = 7");
                    
    $date vbdate($vbulletin->options['dateformat'], $link['dateline'], 1);
                    
    $time vbdate($vbulletin->options['timeformat'], $link['dateline']);        
                    
    $forum['lastpostinfo'] = '<div align="left" class="smallfont"><strong><a href="/showcase/showlink.php?do=showdetails&l='.$link[linkid].'">'.$link[name].'</a></strong><br />by <a href="member.php?find=lastposter&f='.$link[userid].'">'.$link[username].'</a><br /><span style="float:right;">'.$date.' '.$time.' <a href="/showcase/showlink.php?do=showdetails&l='.$link[linkid].'"><img src="http://www.legendarythreads.net/forums/smooth/buttons/lastpost.gif" border="0" alt="View showcase"></a></span></div>';
                    
    $forum['threadcount'] = $tot['count'];
                    
    $forum['replycount'] = $totpost['totpost'];
                    } 
    Thanks - and BTW - nice hack Lionel.

  3. #23
    Junior Member
    Join Date
    Jun 2008
    Posts
    10

    Default Re: Fake vBalinks as forum

    Quote Originally Posted by Lionel View Post
    Cool. You could also fine tune the date by adding the extra css to the span. I think it's class="time" . This way the font will be the same size with the rest of your dates, and make the link title "smallfont" as it appears to be "smallfont" in your forumhome
    Can someone please explain to me how and where I place this piece of code?

    Thanks

    By the way GREAT mod!

  4. #24

    Default Re: Fake vBalinks as forum

    Quote Originally Posted by ozidoggy View Post
    Can someone please explain to me how and where I place this piece of code?
    Look at my example just above your post. You can see where I have placed class="smallfont" to control the font size on the $forum['lastpostinfo'] line (3rd from last).

  5. #25
    Junior Member
    Join Date
    Jun 2008
    Posts
    10

    Default Re: Fake vBalinks as forum

    Thanks Phil.....

  6. #26
    Junior Member
    Join Date
    Oct 2005
    Posts
    7

    Default Re: Fake vBalinks as forum

    Would it be possible to make a Plugin out of this instead of modifying one of the files directly? I tried, unsuccessful tho. Its a neat little feature and I'd love to have it but since I want to keep my workload on updates small I refrain from using any hacks which involve hacking files directly.

    Thanks

  7. #27
    Senior Member
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default Re: Fake vBalinks as forum

    In order to make a plugin, you need a hook at a specific location. If there is no such hook, then a file edit is required if you want to use it.
    Real useful and Cool vBulletin addons

  8. #28
    Junior Member Janfri's Avatar
    Join Date
    Aug 2007
    Location
    Granada, Spain
    Posts
    19

    Default XHTML 1.0 Transitional

    I installed this mod on my site and it works. But the problem for me is, that it is not valid XHTML 1.0 Transitional and gives me 22 errors on W3C, for example related to character "&" is the first character of a delimiter but occurred as data. I ask myself why so many mods here and on vbulletin.org are not XHTML 1.0 Transitional when vbulletin is. Wouldn't it be better to use the same language? I didn't validate my pages before and installed lots of mods. But when I validatet them the other day, I found over 200 errors on my homepage, and all because of the code of the mods. I would really like to use this solution for the link directory. So I would like to ask if you consider this important and if I can reinstall the mods anyway?
    Best regards
    Janfri

  9. #29
    Senior Member
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default

    Simply replace
    div align="left"><strong><a href="/showcase/showlink.php?do=showdetails&l='.$link[linkid].'">'.$link[name].'</a></strong><br />by <a href="member.php?find=lastposter&f='.$link[userid].'">'.$link[username].'</a><br /><span style="float:right;">'.$date.' '.$time.' <a href="/showcase/showlink.php?do=showdetails&l='.$link[linkid].'"><img src="images/buttons/lastpost.gif" border="0" alt="View showcase"></a></span></div>
    with (substituting the bold with your path and alt wording)

    div align="left"><strong><a href="/showcase/showlink.php?do=showdetails&amp;l=' . $link[linkid] . '">' . $link[name] . '</a></strong><br />by <a href="member.php?find=lastposter&amp;f=' . $link[userid] . '">' . $link[username] . '</a><br /><span style="float:right;">' . $date . ' ' . $time . ' <a href="/showcase/showlink.php?do=showdetails&amp;l=' . $link[linkid] . '"><img src="images/buttons/lastpost.gif" border="0" alt="View showcase" /></a></span></div>
    99% of the time, one single error will cause the validator to be confused and display lots of errors.

    So if a mod is causing 200 errors, you'll be surprised that fixing only the first one will change that 200 into a dastically lower errors, such as 5

    Most of the mods that I posted for free are from my 9 years old site and that's not an important issue for me. If that is causing grief, then I will stop posting them.
    Real useful and Cool vBulletin addons

  10. #30
    Junior Member Janfri's Avatar
    Join Date
    Aug 2007
    Location
    Granada, Spain
    Posts
    19

    Thumbs up Validated code

    Quote Originally Posted by Lionel View Post
    So if a mod is causing 200 errors, you'll be surprised that fixing only the first one will change that 200 into a dastically lower errors, such as 5.
    With your help my site has drastically lower errors now, not 5 but 0. The mod works perfectly and the page is validate without errors. Thanks bunches, that was very helpful. I'm afraid I will have to learn XHTML coding to be able to fix this kind of issues myself.
    Best regards
    Janfri

  11. #31
    Senior Member
    Join Date
    Jul 2007
    Location
    Vermont
    Posts
    247

    Thumbs up

    I really like this hack!

    Demo

    I have just a couple small issues with it though. First, the date isn't showing up the same in my custom styles. And second, the 'lastpost' image isn't the same as in the rest of the style. For a better explanation, see the attached images...
    Attached Images Attached Images

  12. #32
    Senior Member
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default

    Simply edit the file to point your images to correct location. I used default vb folders
    Real useful and Cool vBulletin addons

  13. #33
    Senior Member
    Join Date
    Jul 2007
    Location
    Vermont
    Posts
    247

    Default

    But both styles don't use the same image. So, I don't understand how I would do that.

  14. #34
    Senior Member
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default

    <img src="' . $stylevar['imgdir_button'] . '/lastpost.gif"
    Real useful and Cool vBulletin addons

  15. #35
    Senior Member
    Join Date
    Jul 2007
    Location
    Vermont
    Posts
    247

    Default

    Thanks! That's what I call quick service!

    What about the text coloring issue though?

  16. #36
    Member
    Join Date
    Aug 2006
    Location
    Tennessee
    Posts
    41

    Default For vB v3.8.6PL1 & vBa LINKS Directory Product v3.3.0

    Quote Originally Posted by ozwebsites View Post
    Actually no they werent lol, well to me anyway.
    Ditto! ha, ha But I kept reading through the thread until I finally figured it all out. Thanxx Lionel for taking the time/effort to post this information!

    Here's the steps I ended up doing to get it working...

    1)Created a new forum (#147 in MY case) with a Title of LINKS Library
    Note: Our vBa LINK Directory Product is installed 'next to' our Forums Directory, not beneath it.
    (i.e. /public_html/forums; /public_html/links and NOT: /public_html/forums/links)

    2)Next in the Forum Link field (see Forums Manager in AdminCP), pointed it to the website's What's New Links index
    (i.e. http://www.yourwebsite.com/links/whatsnew/links/)

    In the forums/includes/functions_forumlist.php file

    FIND
    Code:
                    $forum['lastpostinfo'] = '-';
    Then place the following CODE below it, remembering to replace XX with YOUR new forumid(=147 in our case)
    Code:
            if ($forum['forumid'] == 'XX')
                    {
                    global $db; 
                    $tot = $db->query_first("SELECT COUNT(*) as count FROM " . TABLE_PREFIX . "adv_links");
                    $link = $db->query_first("SELECT linkid , name, posts, username, userid, dateline FROM " . TABLE_PREFIX . "adv_links ORDER BY linkid DESC");
                    $date = vbdate($vbulletin->options['dateformat'], $link['dateline'], 1);
                    $time = vbdate($vbulletin->options['timeformat'], $link['dateline']);        
                    $forum['lastpostinfo'] = '<div align="left"><strong><a href="/links/showlink.php?do=showdetails&l='.$link[linkid].'">'.$link[name].'</a></strong><br />by <a href="member.php?find=lastposter&f='.$link[userid].'">'.$link[username].'</a><br /><span style="float:right;">'.$date.' '.$time.' <a href="/links/showlink.php?do=showdetails&l='.$link[linkid].'"><img src="images/buttons/lastpost.gif" border="0" alt="View links"></a></span></div>';
                    $forum['threadcount'] = $tot['count'];
                    $forum['replycount'] = $link['posts'];                
                    }
    Note: Placing this code right after what I did a FIND for above, put it inside of a (seemingly) stray '}', but it seemed to work just fine.

  17. #37

    Default

    This code from adwade seems to be the definitive solution for this, I've used it and it works just fine

    Quote Originally Posted by adwade View Post
    Code:
                    $forum['lastpostinfo'] = '-';
    Then place the following CODE below it, remembering to replace XX with YOUR new forumid(=147 in our case)
    Code:
            if ($forum['forumid'] == 'XX')
                    {
                    global $db; 
                    $tot = $db->query_first("SELECT COUNT(*) as count FROM " . TABLE_PREFIX . "adv_links");
                    $link = $db->query_first("SELECT linkid , name, posts, username, userid, dateline FROM " . TABLE_PREFIX . "adv_links ORDER BY linkid DESC");
                    $date = vbdate($vbulletin->options['dateformat'], $link['dateline'], 1);
                    $time = vbdate($vbulletin->options['timeformat'], $link['dateline']);        
                    $forum['lastpostinfo'] = '<div align="left"><strong><a href="/links/showlink.php?do=showdetails&l='.$link[linkid].'">'.$link[name].'</a></strong><br />by <a href="member.php?find=lastposter&f='.$link[userid].'">'.$link[username].'</a><br /><span style="float:right;">'.$date.' '.$time.' <a href="/links/showlink.php?do=showdetails&l='.$link[linkid].'"><img src="images/buttons/lastpost.gif" border="0" alt="View links"></a></span></div>';
                    $forum['threadcount'] = $tot['count'];
                    $forum['replycount'] = $link['posts'];                
                    }
    I did however modify it slightly so that the font is the same size and not bold to match the rest of the forum display (shown in blue)

    Code:
            if ($forum['forumid'] == 'XX')
                    {
                    global $db; 
                    $tot = $db->query_first("SELECT COUNT(*) as count FROM " . TABLE_PREFIX . "adv_links");
                    $link = $db->query_first("SELECT linkid , name, posts, username, userid, dateline FROM " . TABLE_PREFIX . "adv_links ORDER BY linkid DESC");
                    $date = vbdate($vbulletin->options['dateformat'], $link['dateline'], 1);
                    $time = vbdate($vbulletin->options['timeformat'], $link['dateline']);        
                    $forum['lastpostinfo'] = '<div align="left" class="smallfont"><strong><a href="/links/showlink.php?do=showdetails&l='.$link[linkid].'">'.$link[name].'</a></strong><br />by <a href="member.php?find=lastposter&f='.$link[userid].'">'.$link[username].'</a><br /><span style="float:right;">'.$date.' '.$time.' <a href="/links/showlink.php?do=showdetails&l='.$link[linkid].'"><img src="images/buttons/lastpost.gif" border="0" alt="View links"></a></span></div>';
                    $forum['threadcount'] = $tot['count'];
                    $forum['replycount'] = $link['posts'];                
                    }
    http://www.midlandsheritage.co.uk/



  18. #38

    Default

    Its a shame that replys to links doesn't show and you just get a 0 in the posts column, I've tried everything I can think of to fix this grrr...

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. Fake stats help
    By daddy20 in forum Modifications (version 3.x & 2.x)
    Replies: 6
    Last Post: 01-12-2007, 11:32 PM
  2. VBaLinks 2.0?
    By interfx in forum Pre-Sale Questions
    Replies: 117
    Last Post: 10-02-2006, 12:37 PM
  3. Fake item in navigation.
    By DonLKSAB in forum "How Do I..." Questions
    Replies: 3
    Last Post: 08-16-2006, 09:48 AM
  4. VBaLinks 1.01
    By interfx in forum Pre-Sale Questions
    Replies: 15
    Last Post: 07-29-2005, 12:23 AM
  5. vBaLinks Power
    By Polo in forum Pre-Sale Questions
    Replies: 3
    Last Post: 12-15-2004, 08: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
  •