Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > vbArticles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[HACK] Remove Image Thumbnail Code Details »»
[HACK] Remove Image Thumbnail Code
Version: , by James Goddard James Goddard is offline
Developer Last Online: Sep 2011 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-10-2005 Last Update: Never Installs: 0
 
No support by the author.

This is a "fixed" version of dnoyeb2002's hack that removes the article image thumnail resize code.

The original hack hard coded the image paths and did not include category icons. This hack fixes that.

There are two reasons for removing this code: 1. It does not support GIF files. 2. Since the code uses the articles.php file to display the images it messes with the Who's online reporting whenever an article image is displayed in another script (eg CMPS).

In forums/articles.php:

Find:
PHP Code:
$articon ereg_replace($vbart_options['vbartartimgpathab'].$featuredid.'/',"",$articon);
$articonimg "<img title=\"".$title."\" src=\"articles.php?action=thumb&artid=".$featuredid."&id=".$articon."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth'].">"
Replace with:

PHP Code:
$articonimg '<img title="' $title '" src="' $articon '" border=0>'
Find:

PHP Code:
$articon ereg_replace($vbart_options['vbartartimgpathab'].$latestarticleid.'/',"",$articon);
$articonimg "<img title=\"".$title."\" src=\"articles.php?action=thumb&artid=".$latestarticleid."&id=".$articon."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth'].">"
Replace with:

PHP Code:
$articonimg '<img title="' $title '" src="' $articon '" border=0>'
Find:

PHP Code:
$articon ereg_replace($vbart_options['vbartartimgpathab'].$artid.'/',"",$articon);
$articonimg "<img title=\"".$title."\" src=\"articles.php?action=thumb&artid=".$artid."&id=".$articon."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth'].">"
Replace with:

PHP Code:
$articonimg '<img title="' $title '" src="' $articon '" border=0>'
Find:

PHP Code:
$articon ereg_replace($vbart_options['vbartartimgpathab'].$artid.'/',"",$articon);
$articonimg "<img title=\"".$title."\" src=\"articles.php?action=thumb&artid=".$artid."&id=".$articon."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth'].">"
Replace with:

PHP Code:
$articonimg '<img title="' $title '" src="' $articon '" border=0>'
Find:

PHP Code:
$subcaticon ereg_replace($vbart_options['vbartcatimgpathab'],"",$subcaticon);
 
$subcaticonimg "<img title=\"".$subcatname."\" src=\"articles.php?action=thumbcat&id=".$subcaticon."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth'].">"
Replace with:

PHP Code:
 $subcaticonimg '<img title="' $subcatname '" src="' $subcaticon '" border=0>'
Find:

PHP Code:
$caticonc ereg_replace($vbart_options['vbartcatimgpathab'],"",$caticonc);
$caticonimgc "<img title=\"".$catnamec."\" src=\"articles.php?action=thumbcat&id=".$caticonc."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth'].">"
Replace with:

PHP Code:
$caticonimgc '<img title="' $catname '" src="' $caticonc '" border=0>'
If you are using the CMPS featured article hack make the following change to /forums/modules/cmps-articles.php:

Find:

PHP Code:
 $articon ereg_replace($vbart_options['vbartartimgpathab'].$articleid.'/',"",$articon);
$articonimg "<a href=\"$vboptions[bburl]/articles.php?action=viewarticle&artid=".$articleid."\"><img title=\"".$title."\" src=\"$vboptions[bburl]/articles.php?action=thumb&artid=".$articleid."&id=".$articon."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth']."></a>"
Replace with:

PHP Code:
$articonimg '<a href="' $vboptions[bburl] . '/articles.php?action=viewarticle&artid=' $articleid '"><img title="' $title '" src="' $articon '" border=0>'
James

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-11-2005, 12:35 PM
drex drex is offline
 
Join Date: Feb 2005
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is this to the original file or to the file of dnoyeb2002's?

the entire system is working fine except that i don't want it to resize the category images.

i tried just your part of the hack related to :

Find:

PHP Code:
$subcaticon = ereg_replace($vbart_options['vbartcatimgpathab'],"",$subcaticon);
$subcaticonimg = "<img title=\"".$subcatname."\" src=\"articles.php?action=thumbcat&id=".$subcatico n."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth'].">";

Replace with:

PHP Code:
$subcaticonimg = '<img title="' . $subcatname . '" src="' . $subcaticon . '" border=0>';

and i still get a 'resized' category image at the top of the list...

check out x5world.com/articles.php and click on NAVIGATION category.

thanks
Reply With Quote
  #3  
Old 03-11-2005, 01:50 PM
James Goddard James Goddard is offline
 
Join Date: Dec 2004
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by drex
is this to the original file or to the file of dnoyeb2002's?

the entire system is working fine except that i don't want it to resize the category images.

i tried just your part of the hack related to :

Find:

PHP Code:
$subcaticon = ereg_replace($vbart_options['vbartcatimgpathab'],"",$subcaticon);
$subcaticonimg = "<img title=\"".$subcatname."\" src=\"articles.php?action=thumbcat&id=".$subcatico n."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth'].">";


Replace with:

PHP Code:
$subcaticonimg = '<img title="' . $subcatname . '" src="' . $subcaticon . '" border=0>';


and i still get a 'resized' category image at the top of the list...

check out x5world.com/articles.php and click on NAVIGATION category.

thanks
Looks like I missed one:

Find:

PHP Code:
$caticonc ereg_replace($vbart_options['vbartcatimgpathab'],"",$caticonc);
$caticonimgc "<img title=\"".$catnamec."\" src=\"articles.php?action=thumbcat&id=".$caticonc."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth'].">"
Replace with:

PHP Code:
$caticonimgc '<img title="' $catname '" src="' $caticonc '" border=0>'
Reply With Quote
  #4  
Old 06-06-2005, 11:55 PM
Club3G Club3G is offline
 
Join Date: Aug 2004
Location: Orlando, Fl
Posts: 300
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just used this on 2.0, solved many headaches. Thank you very much!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:13 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04067 seconds
  • Memory Usage 2,281KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (16)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete