Results 1 to 3 of 3

Thread: Thumbnail Link v1 News.module Hack

  1. #1
    Join Date
    Jun 2008
    Posts
    15

    Default Thumbnail Link v1 News.module Hack

    Thumbnail Link v1 News.module Hack

    Description:
    This hack makes thumbnails (in news.module) of attached images link to the thread, but not to fullscale image of the thumbnail.

    Attachment 4615

    Manual:
    Step 1.
    Go to admincp and search for adv_portal_newsbits_attach_thumb in themes.

    Step 2.
    Find and change this:
    PHP Code:
    <a href="$vboptions[bburl]/attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"target="_blank"</if>><img src="$vboptions[bburl]/attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1&amp;d=$attachment[thumbnail_dateline]class="thumbnail" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]" 4="$attachment[attachmentid]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a> &nbsp
    to this:
    PHP Code:
    <a href="<if condition="THIS_SCRIPT == 'adv_index'">forum/showthread.php?$session[sessionurl]t=$news[threadid]<else />$vboptions[bburl]/attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]</if>"<if condition="$show['newwindow']"target="_blank"</if>><img src="$vboptions[bburl]/attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1&amp;d=$attachment[thumbnail_dateline]class="thumbnail" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]" 4="$attachment[attachmentid]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a> &nbsp
    And save changes.

    Step 3.
    Open modules/news.php

    Search for:
    PHP Code:
    $news['message'] .= '...' construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $news['threadid'], $vbulletin->session->vars['sessionurl']); 
    And above add:
    PHP Code:
    $news['message'] = preg_replace('|<a href="' $vbulletin->options['bburl'] . '/(.*)" >|U','<a href="' $vbulletin->options['bburl'] . '/showthread.php?t=' $news['threadid'] . '" >',$news['message']); 
    $news['message'] = str_replace("alt=","",$news['message']); 
    Step 4.
    Save and upload news.php back to the server. That's it, enjoy.

    I hope that this little hack will help make your website better. Cheers. And hello from Ventspils, Latvia

  2. #2

    Default

    Is there a version of this for the latest script? Lack of this ability is causing us all kinds of headaches.

  3. #3
    Join Date
    Jun 2008
    Posts
    15

    Default

    Wow. This was ages ago. Unfortunately I didn't update this. Although I am available to do some freelance. I can recreate this plugin for £40. Send me an email if you are interested.

    Max.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. News inline image/thumbnail link to thread
    By ptytb in forum "How Do I..." Questions
    Replies: 8
    Last Post: 08-06-2008, 05:54 AM
  2. Is anyone aware of a module that displays news with a thumbnail of 1st attachment?
    By K4L in forum Module & Modification Discussion & Requests
    Replies: 11
    Last Post: 07-02-2008, 05:36 PM
  3. Image Alignment Hack for your News Module.
    By chkdg8 in forum Modifications (version 3.x & 2.x)
    Replies: 19
    Last Post: 12-08-2007, 04:23 AM
  4. Thumbnail the img bbcode tag on News
    By fozo in forum "How Do I..." Questions
    Replies: 1
    Last Post: 10-27-2007, 01:30 PM
  5. How to make thumbnail link to thread?
    By JohnBee in forum Modifications (version 3.x & 2.x)
    Replies: 6
    Last Post: 11-30-2006, 06:24 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
  •