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)
-   -   Forum Display Enhancements - Thread Thumbnails (https://vborg.vbsupport.ru/showthread.php?t=237404)

abdelali 12-21-2010 04:53 PM

Someone now how to put this mod in recent threads of vbadvanced cmps portal. thanks

mgurain 12-21-2010 11:23 PM

This mod is very needed, but is not working,
who could make one with single product install and is working fine ?
Or fix this mod.

Thanks,,

AlexisMedia 12-31-2010 05:27 PM

I'd like to use the "first attachment" option but it appears that vBSEO is changing my image attachment urls causing the thread thumbnail to be broken. Any ideas? I'm really needing to get this thing going as soon as possible.

Thanks!

AlexisMedia 01-01-2011 06:20 PM

Begging for help at this point...

I've switched off vBSEO attachment rewrites but it's still having issues. Here is the urls

What thread thumbnails is looking for:
http://www.mysite.com/forums/attachm...&stc=1&thumb=1

Where it needs to be looking:
http://www.mysite.com/forums/attachm...9&d=1293912681

Please help! Thanks!

AlexisMedia 01-01-2011 06:46 PM

Fixed! Had the master setting for thumbnails turned off :(

megamoose 01-06-2011 08:53 PM

Null, thanks for this mod. It is perfect.

The thumbnail generator I created in the previous version had a bug in it which would cause a great server load. This new version should run a lot quicker and more efficient. Remember if it does hang on your server decrease the STEP_AMOUNT variable.

Create a file on your server called threadthumbupdate.php with the following in the file and open it in your browser.

PHP Code:

<?php $STEP_AMOUNT 20000?>

<input type="button" id="btnNext" value="Process Next Results" onClick="window.location='?start='+(<?php echo $_GET["start"]; ?>+<?php echo $STEP_AMOUNT;?>)" disabled=true><br>
The button above should enable once this batch is complete!<br>
<br>

<?php
error_reporting
(E_ALL & ~E_NOTICE & ~8192);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('SKIP_SESSIONCREATE'1);
define('NOCOOKIES'1);
define('THIS_SCRIPT''xupdate');
define('CSRF_PROTECTION'true);

// #################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array();

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

if (!
$_GET["start"]) { $_GET["start"] = 0; }


        
$threads $db->query_read_slave("
        SELECT *
        FROM " 
TABLE_PREFIX "thread
        LIMIT "
.$db->escape_string($_GET["start"]).","$db->escape_string($STEP_AMOUNT));

while (
$thread $db->fetch_array($threads)){


    
$posts $db->query_read_slave("SELECT * FROM `" TABLE_PREFIX "post` WHERE `postid` = '".$thread["firstpostid"]."'");
    
$post $db->fetch_array($posts);

preg_match('/\[img\](.*?)\[\/img\]/i',$post["pagetext"],$matches);
$query "UPDATE `" TABLE_PREFIX "thread` set `thumbnailurl` = '".$db->escape_string($matches[1])."' WHERE threadid = " $thread["threadid"];

$db->query_write($query);

}
?>

<script> document.getElementById("btnNext").disabled = false;

</script>


DavidMatus 01-09-2011 02:43 PM

Quote:

Originally Posted by megamoose (Post 2145120)
Null, thanks for this mod. It is perfect.

The thumbnail generator I created in the previous version had a bug in it which would cause a great server load. This new version should run a lot quicker and more efficient. Remember if it does hang on your server decrease the STEP_AMOUNT variable.

And now is even better Thank you so much! now it work so perfect

fxwoody 01-14-2011 02:16 AM

Well Moose! You made my day my friend ;)
Just reinstalled the new 4.1.1 for my forum and used your Script.......you're the man !!!!

Works like a charm :)
No more overload nor crash of anything.

I think you should take over this mod and reorganize it for every one.

Cheers

AlexisMedia 01-14-2011 05:24 AM

If your using the upload 1st attachment option and a user accidently uploaded the wrong image 1st... is there a way I can admin change which image is the thumbnail? Other then having the user redo the post?

Is there a way I can maybe access the users attachment and change the image for that attachment name or something?

Does that make sense?

Thanks!

AlexisMedia 01-14-2011 10:22 PM

My users were too frustrated with this so I had to uninstall. I would REALLY like it if this can be either editable by admin OR a separate specified attachment option when the user is writing their post. It can be attached and changed as the user pleases... I'll keep my eye out because I REALLY want this feature but the 1st attachment thing just doesn't work out. Img tags don't work about because not all are using image tags over attachments. And user entered URL doesn't work if the user is doing it as an attachment. So many options but not 1 solution that works for everybody and is easily changeable : (


All times are GMT. The time now is 05:55 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.01486 seconds
  • Memory Usage 1,759KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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