vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Thread Image grabber (https://vborg.vbsupport.ru/showthread.php?t=297093)

stuie_b 04-10-2013 10:00 PM

Thread Image grabber
 
1 Attachment(s)
Thread image grabber is a request by "The Realist" it will enable you to grab all attached images from a thread and display them (as images) on a seperate page.

+ Pulls all attached images from a given thread and displays as images (not links as vb currently does)
+ Adds Link to thread tools bar (under thread tools)
+ Adds icon to forum list

Note: Please be aware although support is provided it is limited. This version is in beta so expect bugs!



As always feature requests are appreciated.

Stuie.

stuie_b 04-11-2013 08:24 PM

<font color="Red">Updated 30/05/2013</font>

1.3
+ Added support for inline/embedded images (Images which aren't attached)
+ Added support for vB 3.x.x (Tested only on vB 3.8.7 PL3)
+ Added template cache (Thanks to GENX2 for the heads up on that one)

1.2
+ Added support for vBulletin versions below 4.0.3

V1.0 First release
Nothing its the first release

The Realist 04-11-2013 08:39 PM

Well done M8 and a big thanks for this.

Regards

The Realist 04-11-2013 08:42 PM

Woooo just installed and loads of errors:

Quote:

#0 /home/*****/public_html/******/includes/adminfunctions_template.php(2842): vB_TemplateParser->validate(Array)
#1 /home/******/public_html/******/includes/adminfunctions_plugin.php(545): compile_template('{vb:stylevar ht...')
#2 /home/******/public_html/******/admincp/plugin.php(1714): install_product(' #3 {main}


Fatal error: Unable to find a class to validate: vB_TemplateParser_Curlycssfile on line 1035 in [path]/includes/class_template_parser.php in [path]/vb/vb.php on line 284
#0 vb_error_handler(256, Unable to find a class to validate: vB_TemplateParser_Curlycssfile on line 1035 in /home/******/public_html/******/includes/class_template_parser.php , /home/******/public_html/******/vb/vb.php, 284, Array ([exception] => Exception Object ([] => Unable to find a class to validate: vB_TemplateParser_Curlycssfile,[] => ,[] => 0,[] => /home/******/public_html/******/includes/class_template_parser.php,[] => 1035,[] => Array ([0] => Array ([file] => /home/******/public_html/******/includes/adminfunctions_template.php,[line] => 2842,[function] => validate,[class] => vB_TemplateParser,[type] => ->,[args] => Array ([0] => Array ())),[1] => Array ([file] => /home/******/public_html/******/includes/adminfunctions_plugin.php,[line] => 545,[function] => compile_template,[args] => Array ([0] => {vb:stylevar htmldoctype} xmlns:fb="http://www.facebook.com/2008/fbml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}"> {vb:raw headinclude} {vb:cssfile faq.css} {vb:raw headinclude_bottom} {vb:raw header} {vb:raw navbar}

{vb:raw mkio_mode}

{vb:raw mkio_mode_description}


{vb:rawphrase attached_thumbnails} {vb:rawphrase attached_files}{vb:raw mkio_threadImages}
{vb:raw footer} )),[2] => Array ([file] => /home/******/public_html/******/admincp/plugin.php,[line] => 1714,[function] => install_product,[args] => Array ([0] => Pulls all the images attached to a thread and displays them in one place 1.0 xmlns:fb="http://www.facebook.com/2008/fbml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}"> {vb:raw headinclude} {vb:cssfile faq.css} {vb:raw headinclude_bottom} {vb:raw header} {vb:raw navbar}

{vb:raw mkio_mode}

{vb:raw mkio_mode_description}


{vb:rawphrase attached_thumbnails} {vb:rawphrase attached_files}{vb:raw mkio_threadImages}
{vb:raw footer} ]]> misc_start db->escape_string($_REQUEST['thread']); if(!$threadId){ standard_error("Missing ThreadID"); } //------------------------- $qh = $vbulletin->db->query_read(" SELECT p.postid,p.threadid,a.contentid,a.attachmentid,a.f iledataid,a.filename,fd.extension,fd.dateline FROM ".TABLE_PREFIX."post AS p LEFT JOIN ".TABLE_PREFIX."attachment AS a ON (p.postid=a.contentid) LEFT JOIN ".TABLE_PREFIX."filedata as fd ON a.filedataid=fd.filedataid WHERE p.threadid='".$threadId."' AND fd.extension IN ('png', 'jpg', 'jpeg', 'gif', 'bmp')"); while($row = $vbulletin->db->fetch_array($qh)) { $html .= "options['bburl'].'/attachment.php?attachmentid='.$row['attachmentid'].'&d='.$row['dateline']."\">options['bburl'].'/attachment.php?attachmentid='.$row['attachmentid'].'&thumb=1&d='.$row['dateline']."\" alt=\"".$row['filename']."\" title=\"".$row['filename']."\"> "; } //------------------------- $navbits = construct_navbits(array('' => "Thread Images")); $navbar = render_navbar_template($navbits); $templater = vB_Template::Create('mkio_threadimg'); $templater->register_page_templates(); $templater->register('navbar', $navbar); $templater->register('mkio_mode', "View Thread Images"); $templater->register('mkio_mode_description', "View all images attached to a given thread"); $templater->register('mkio_threadImages', $html); print_output($templater->render()); }]]> showthread_start Display all images';]]> ,[1] => 0)))),[code] => 256)) called at [(null):0] #1 trigger_error(Unable to find a class to validate: vB_TemplateParser_Curlycssfile on line 1035 in /home/******/public_html/******/includes/class_template_parser.php , 256) called at [/home/******/public_html/******/vb/vb.php:284] #2 vB::handleException(Exception Object ([] => Unable to find a class to validate: vB_TemplateParser_Curlycssfile,[] => ,[] => 0,[] => /home/******/public_html/******/includes/class_template_parser.php,[] => 1035,[] => Array ([0] => Array ([file] => /home/******/public_html/******/includes/adminfunctions_template.php,[line] => 2842,[function] => validate,[class] => vB_TemplateParser,[type] => ->,[args] => Array ([0] => Array ())),[1] => Array ([file] => /home/******/public_html/******/includes/adminfunctions_plugin.php,[line] => 545,[function] => compile_template,[args] => Array ([0] => {vb:stylevar htmldoctype} xmlns:fb="http://www.facebook.com/2008/fbml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}"> {vb:raw headinclude} {vb:cssfile faq.css} {vb:raw headinclude_bottom} {vb:raw header} {vb:raw navbar}

{vb:raw mkio_mode}

stuie_b 04-11-2013 08:57 PM

Code:

Fatal error: Unable to find a class to validate: vB_TemplateParser_Curlycssfile on line 1035
That error appears to be related to vbulletin it's self and suggests an outdated version of vBulletin, Make sure your running the latest version of VB and try again.


Stuie.

GENX2 04-11-2013 11:59 PM

thanks so much.
I have note one :
there is query one

add new plugin name hook " cache_templates "
this includes :
PHP Code:

{
        
$cache[] = 'mkio_threadimg';



tpearl5 04-12-2013 09:59 AM

Curious if this will work with 4.1.12, or are those classes not available until 4.2? If not perhaps a min version check should be in order.

stuie_b 04-12-2013 03:13 PM

It appears any version before VB 4.0.3 will fail to install with the current code.

VB 4.0.2 Fails
VB 4.0.3 Fails
VB 4.0.4 Works
VB 4.0.5 Works
VB 4.0.8 Works
VB 4.1.0 Works

EDIT: Updated package to incorporate VB verions 4.0.3 and below. (import the package in the VB 4.0.0-4.0.3 folder)

Stuie.

abdobasha2004 04-12-2013 10:43 PM

2 questions :
1- Do you have a vb 3.7 version compatible?
2- Is it possible to grab images not attached, i mean not on the forum server, just the image url in the first post or so...

tpearl5 04-17-2013 04:33 PM

Quote:

Originally Posted by abdobasha2004 (Post 2415993)
2- Is it possible to grab images not attached, i mean not on the forum server, just the image url in the first post or so...

I would also like to see this. anything inside of bb img tags


All times are GMT. The time now is 02:36 AM.

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.01676 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete