Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Forumhome Attachment Thumbnails Details »»
Forumhome Attachment Thumbnails
Version: 1.00, by jskoh jskoh is offline
Developer Last Online: Mar 2023 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 4.0.3 Rating:
Released: 10-18-2010 Last Update: Never Installs: 14
Uses Plugins
 
No support by the author.

hi, im putting up this mod to share with you guy which i have paid someone to do it. but it wasnt really completed. if some coder can finish it with the thread content with it. this mod will be complete.

Installing Instruction

Import the file product-tsk_attth.xml in Admincp.

For location to show in Forumhome, add the {vb:raw tsk_attth} to the location you want to show the thumbnail.
For location to show inside the Forum - Category box, add the {vb:raw tsk_attth} to the template forumhome_forumbit_level2_post

As in the example i've shown you, that's under forum's description:

Find

<vb:if condition="$show['forumdescription']"><p class="forumdescription">{vb:raw forum.description}</p></vb:if>

Add below it

{vb:raw tsk_attth}

Download Now

File Type: xml product-tsk_attth.xml (5.0 KB, 140 views)

Show Your Support

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

Comments
  #2  
Old 10-19-2010, 02:34 PM
jskoh jskoh is offline
 
Join Date: Dec 2008
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is the screenshot of it. it rotate on every refresh.
Attached Images
File Type: jpg rotating ads.JPG (16.4 KB, 0 views)
Reply With Quote
  #3  
Old 10-19-2010, 09:03 PM
LuisManson LuisManson is offline
 
Join Date: Jun 2010
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for sharing
Reply With Quote
  #4  
Old 10-20-2010, 01:15 PM
RamisK RamisK is offline
 
Join Date: Jan 2009
Location: Holland
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice work
Reply With Quote
  #5  
Old 10-21-2010, 12:56 AM
bond010007's Avatar
bond010007 bond010007 is offline
 
Join Date: Sep 2008
Location: EGYPT
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great work i love it thanks i will try it over my forum
Reply With Quote
  #6  
Old 10-22-2010, 05:22 AM
mitch84 mitch84 is offline
 
Join Date: Mar 2008
Location: france
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

don't work with vb4.0.8, database error
Reply With Quote
  #7  
Old 10-22-2010, 03:48 PM
jskoh jskoh is offline
 
Join Date: Dec 2008
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mitch84 View Post
don't work with vb4.0.8, database error
try input your forums id at admincp see attachment to avoid database error. currently im using 4.0.3. not too sure about your version
Attached Images
File Type: jpg forumsID.JPG (68.5 KB, 0 views)
Reply With Quote
  #8  
Old 10-23-2010, 04:21 PM
wisemasterchief's Avatar
wisemasterchief wisemasterchief is offline
 
Join Date: Nov 2009
Location: Chicago, IL
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

who is author of this MOD?

suggested changes provided below as this provides a block with border for your images, maintains consistent image size
this code is not for usage on your system as each thumbnail produces its own block, whereas we would want a single block for ALL images. please look at code section area where you will find '<h2 class="blockhead">' ... it has been placed in wrong area. closing </DIV> is probably mislocated also. please advise. peace


Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="tsk_attth" active="1">
	<title>Forumhome Attachment Thumbnails</title>
	<description />
	<version>1.0</version>
	<url />
	<versioncheckurl />
	<dependencies>
	</dependencies>
	<codes>
	</codes>
	<templates>
	</templates>
	<stylevardfns>
	</stylevardfns>
	<stylevars>
	</stylevars>
	<plugins>
		<plugin active="1" executionorder="5">
			<title>Attachment Thumbnails at forumhome</title>
			<hookname>forumhome_start</hookname>
			<phpcode><![CDATA[if ($vbulletin->options[tsk_attth_online]) {

$frfromcat = $vbulletin->db->query_read("SELECT childlist FROM " . TABLE_PREFIX . "forum WHERE forumid IN (" . $vbulletin->options[tsk_attth_cat]. ")");

while ($cat = $vbulletin->db->fetch_array($frfromcat)) {
    $catget .= $cat[childlist];
}

$thfromfr = $vbulletin->db->query_read("SELECT threadid FROM " . TABLE_PREFIX . "thread WHERE forumid IN (".$catget.")");

$ths = array();
while ($th = $vbulletin->db->fetch_array($thfromfr)) {
    array_push($ths, $th[threadid]);
}

$thget = implode(',', $ths);
$psfromth = $vbulletin->db->query_read("SELECT postid FROM " . TABLE_PREFIX . "post WHERE threadid IN (" . $thget . ")");

$pssid = array();
while ($pss = $vbulletin->db->fetch_array($psfromth)) {
   array_push($pssid, $pss[postid]);
}

$ps_final = implode(',', $pssid);

if ($vbulletin->options[tsk_attth_manual]) {
$attid = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "attachment WHERE attachmentid IN (" .$vbulletin->options[tsk_attth_manualvalues].") ORDER BY RAND() LIMIT 0," . $vbulletin->options[tsk_attth_limit]);

 } else {
$attid = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "attachment WHERE contentid IN (" .$ps_final.") ORDER BY RAND() LIMIT 0," . $vbulletin->options[tsk_attth_limit]);
}

  while ($row = $vbulletin->db->fetch_array($attid)) {

     $tsk_attth .= '<h2 class="blockhead">Thread thumbnails - Click on thumbnail to go to forum thread</h2>
<div style="border: 1px solid #7192a8; overflow: auto;">'. '<a href="showpost.php?p=' . $row[contentid] .'"<img width="140" vspace="2" hspace="1" height="80" border="0" src="attachment.php?attachmentid=' . $row[attachmentid] . '&thumb=1" alt="' . $row[filename] . '" ></a> </div>&nbsp;&nbsp;';

}


vB_Template::preRegister('FORUMHOME', array('tsk_attth' => $tsk_attth));
vB_Template::preRegister('forumhome_forumbit_level2_post', array('tsk_attth' => $tsk_attth));


}]]></phpcode>
		</plugin>
	</plugins>
	<phrases>
		<phrasetype name="vBulletin Settings" fieldname="vbsettings">
			<phrase name="setting_tsk_attth_cat_desc" date="1279352331" username="Tsuki" version="1.0"><![CDATA[Pull attachment thumbnails in these categories' ID. <br/>
<b>Do not leave this field blank <br/>or you will get a database error.</b>]]></phrase>
			<phrase name="setting_tsk_attth_cat_title" date="1279352331" username="Tsuki" version="1.0"><![CDATA[Category settings]]></phrase>
			<phrase name="setting_tsk_attth_limit_desc" date="1279349607" username="Tsuki" version="1.0"><![CDATA[Number of attachment images to display]]></phrase>
			<phrase name="setting_tsk_attth_limit_title" date="1279349607" username="Tsuki" version="1.0"><![CDATA[Number of images to display]]></phrase>
			<phrase name="setting_tsk_attth_manual_desc" date="1279352618" username="Tsuki" version="1.0"><![CDATA[Turn on/off Attachment Manually displaying.]]></phrase>
			<phrase name="setting_tsk_attth_manual_title" date="1279352618" username="Tsuki" version="1.0"><![CDATA[Enable Manual Attachments Displaying?]]></phrase>
			<phrase name="setting_tsk_attth_manualvalues_desc" date="1279352569" username="Tsuki" version="1.0"><![CDATA[Input the attachment ID you want to manually showing.</br>
Separate each value by comma (,).]]></phrase>
			<phrase name="setting_tsk_attth_manualvalues_title" date="1279352569" username="Tsuki" version="1.0"><![CDATA[Manual Attachment Displaying]]></phrase>
			<phrase name="setting_tsk_attth_online_desc" date="1279349185" username="Tsuki" version="1.0"><![CDATA[Turn on/off the product]]></phrase>
			<phrase name="setting_tsk_attth_online_title" date="1279349185" username="Tsuki" version="1.0"><![CDATA[Product On/Off Settings]]></phrase>
			<phrase name="settinggroup_tsk_attth" date="1279349149" username="Tsuki" version="1.0"><![CDATA[Forumhome Attachment Thumbnails]]></phrase>
		</phrasetype>
	</phrases>
	<options>
		<settinggroup name="tsk_attth" displayorder="600">
			<setting varname="tsk_attth_online" displayorder="10">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="tsk_attth_cat" displayorder="20">
				<datatype>free</datatype>
			</setting>
			<setting varname="tsk_attth_limit" displayorder="30">
				<datatype>posint</datatype>
				<defaultvalue>3</defaultvalue>
			</setting>
			<setting varname="tsk_attth_manual" displayorder="40">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>0</defaultvalue>
			</setting>
			<setting varname="tsk_attth_manualvalues" displayorder="50">
				<datatype>free</datatype>
				<defaultvalue>1,2,3</defaultvalue>
			</setting>
		</settinggroup>
	</options>
	<helptopics>
	</helptopics>
	<cronentries>
	</cronentries>
	<faqentries>
	</faqentries>
</product>
Reply With Quote
  #9  
Old 01-23-2011, 02:59 PM
bartek24m bartek24m is offline
 
Join Date: Nov 2005
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

could someone rewrite it for 3,8.x ?
Reply With Quote
  #10  
Old 07-04-2011, 08:09 AM
bskr84 bskr84 is offline
 
Join Date: Aug 2010
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it do not work for 4.14, can not show the pic


can someone help me??
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:53 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09906 seconds
  • Memory Usage 2,331KB
  • Queries Executed 24 (?)
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
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete