vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   New Posting Features - Thread Thumbnails (https://vborg.vbsupport.ru/showthread.php?t=214755)

Null Parameter 02-26-2010 01:19 PM

Quote:

Originally Posted by Mike_K (Post 1991946)
Would it help if you have access to a VB 4 test board? Or what do you need more?

That should theoretically be all that I need.

Well, that and to brush up on my vB coding skills :)

Mike_K 02-26-2010 02:29 PM

Quote:

Originally Posted by Null Parameter (Post 1991986)
That should theoretically be all that I need.

Let me know if you want this.

Quote:

Well, that and to brush up on my vB coding skills :)
You will get it if you do it :D

I have no knowledge about the coding. But if i take a look in the plugin it seems that only the database names changed?

Null Parameter 02-26-2010 02:40 PM

Quote:

Originally Posted by Mike_K (Post 1992035)
Let me know if you want this.

If you guys really want this that badly, I can take a stab at it.

Mike_K 02-26-2010 02:46 PM

Sure!!!!!

This mod should basic in a VB!

Aceman 02-26-2010 03:52 PM

Sweet! He's back! I can't wait. MOTM if you ask me.

BTW: Suggestion: Is it possible for a user to Flag an attachment as the thread thumbnail rather then it drawing from the first attachment, first image, or URL?

After upload it asks, "Set as thread thumbnail? Yes/No"

Just a thought.

Thanks for you contribution!
Aceman

Cust0ms 03-01-2010 04:38 PM

When Thread Thumbnails is working I see only one thread in threads list. How to fix it?

kalisekj 03-01-2010 10:52 PM

I also would love to see this ported to VB4, this is a must have mod for Movie Sites Like Mine. I would Also Donate. Contact me if you need a server and site to test this on I can give you both.

MrRem 03-02-2010 07:03 AM

Is there a way to make it check for:

Thumbnail URL.
if no URL, use first attachment.
if no attachment, use first IMG tag in whole thread.

If this exists, how make work?

Also. How do you make the thumbnail image replace "forum_new.gif" on the Forumhome ?

Null Parameter 03-02-2010 03:31 PM

Quote:

Originally Posted by Cust0ms (Post 1994571)
When Thread Thumbnails is working I see only one thread in threads list. How to fix it?

Which settings are you using?

Quote:

Originally Posted by MrRem (Post 1995044)
Is there a way to make it check for:

Thumbnail URL.
if no URL, use first attachment.
if no attachment, use first IMG tag in whole thread.

If this exists, how make work?


Also. How do you make the thumbnail image replace "forum_new.gif" on the Forumhome ?

There is currently no way to use every option like that, but it has been discussed as a possible future feature.

There is also no option to display it on the forumhome, although I'm not exactly sure why you would want that anyway when the thumbnails are for an individual thread and not the forum.

Quote:

Originally Posted by kalisekj (Post 1994816)
I also would love to see this ported to VB4, this is a must have mod for Movie Sites Like Mine. I would Also Donate. Contact me if you need a server and site to test this on I can give you both.

A very big thanks to Mike_K, as he has setup a test forum for me to develop on. And thank you to the several other people that also offered.


At this time, I have most of the functionality ported over to vB4. The issues I'm still trying to deal with is the threadbit Auto-Template edit, Attachments and Search integration (search has changed a lot).

I've also been improving things quite a bit, like allowing any CSS style on the thumbnail, so you can specify width, height, max-width, max-height, margins, borders and any other CSS property you wish to apply to the thumbnails.

Mike_K 03-03-2010 07:26 AM

After seeing the first results I think we will get a new VB 4 motm! :up:

Cust0ms 03-03-2010 11:55 AM

1 Attachment(s)
@Null Parameter, please look @ the screenshot

Null Parameter 03-03-2010 01:54 PM

Quote:

Originally Posted by Cust0ms (Post 1995988)
@Null Parameter, please look @ the screenshot

The First Attachment option is known to be broken at the moment. I should probably release a fix for that since I'm already messing with the code.... :D

Null Parameter 03-03-2010 05:31 PM

Got everything updated to vB4! New mod is posted for your enjoyment.

Also update this version of the mod to fix the First Attachment DB Error as well as include the fix for using First Image in Post for new threads.


Thanks again to everybody that helped get this going again and those that assisted people in my absence.

motoxer311 03-04-2010 01:54 PM

Not working for me, just shows regular icons..

MrRem 03-05-2010 09:05 AM

Is there a way to make the Thread Thumbnail a requirement before submitting a post?

Null Parameter 03-05-2010 01:24 PM

Quote:

Originally Posted by MrRem (Post 1997621)
Is there a way to make the Thread Thumbnail a requirement before submitting a post?

That is currently an option in the vB4 version, but not in this one. If there's demand for it, I could probably port that functionality back here as well.

Xtrigit 03-06-2010 03:12 PM

How can I manually add this to a custom style? I have a custom style that has basic functionality and I would like to know what code this MOD is calling that my style does not have and therefore not displaying the thumbnails.

Works great on all fully functional styles.

Thanks in advance =]

Xtrigit 03-06-2010 04:42 PM

I was able to get it to work and this is my final code. I'd really appreaciate it if you could take a minute to review it and see if there is anything I could change to improve it.

Code:

<table cellpadding="0" cellspacing="0">
<if condition="$bg++"><!-- Row: $bg --></if>
<tr class="<if condition="$bg%2 == 0">alt2<else />alt1</if>" height="40px">
<td width="24">
                <if condition="$show[threadicons]">
          <td class="alt2" align="center" valign="middle">
                  <if condition="$thread[thumbnaildisplay] AND !$thread[sticky]">
                          <a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
                            <img src="$thread[thumbnailurl]" alt="" border="0" width="61"/>
                          </a>
                  <else />
                      <if condition="$show[threadicon]">
                      <img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
                      </if>
                  </if>
          </td>
      </if>
        </td>
    <td width="100%">

Regards,
Xtrigit

Cerbero1000 03-30-2010 12:03 PM

All works fine except the "no thumbnail" images that appears as a red cross (/attachment.php?attachmentid=&stc=1&thumb=1). Can someone help me? If I select image url "no thumb" appear correctly but not for first attachment option.
Thanks

Null Parameter 03-30-2010 01:28 PM

Quote:

Originally Posted by Cerbero1000 (Post 2012819)
All works fine except the "no thumbnail" images that appears as a red cross (/attachment.php?attachmentid=&stc=1&thumb=1). Can someone help me? If I select image url "no thumb" appear correctly but not for first attachment option.
Thanks

Quote:

Originally Posted by Null Parameter (Post 1996084)
The First Attachment option is known to be broken at the moment.

The First Attachment option doesn't work well in general.

Cerbero1000 03-31-2010 10:19 AM

Solved. All works perfectly!

matthewhotdude 03-31-2010 12:32 PM

Installed, but no thumbnails are showing up.

Ok sorted that out, had to add the width manually.

But is there a way to update all old threads so the thumbnails show up?

Null Parameter 03-31-2010 01:35 PM

Quote:

Originally Posted by matthewhotdude (Post 2013412)
Installed, but no thumbnails are showing up.

Ok sorted that out, had to add the width manually.

But is there a way to update all old threads so the thumbnails show up?

I haven't tested this, but others have used it successfully.


Quote:

Originally Posted by megamoose (Post 1911383)
This should enable batch processing. I have tested it.
Change the $STEP_AMOUNT at the top to something lower if you still get errors
Remember this is for vB version 3.8
Always backup your data before running scripts like these


TO THOSE WHO HAVEN'T BEEN FOLLOWING THE CONVERSATION:
This script will go through all your existing posts and give them thumbnails, based on the First IMG in post option.

Code:

<?php $STEP_AMOUNT = 600; ?>

<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($_GET["start"]+$STEP_AMOUNT));

while ($thread = $db->fetch_array($threads)){
    echo "<b>Thread:</b> ".$thread["title"]."<br>";

    $posts = $db->query_read_slave("SELECT * FROM `" . TABLE_PREFIX . "post` WHERE `postid` = '".$thread["firstpostid"]."'");
    $post = $db->fetch_array($posts);
    echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <b>First Post:</b> ".$post["title"]."<br>";
preg_match('/\[img\](.*?)\[\/img\]/i',$post["pagetext"],$matches);
$query = "UPDATE `" . TABLE_PREFIX . "thread` set `thumbnailurl` = '".$db->escape_string($matches[1])."' WHERE threadid = " . $thread["threadid"];
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <b>SQL:</b>".$query."<br><br>";
$db->query_write($query);

}
?>

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



Null Parameter 03-31-2010 01:37 PM

Quote:

Originally Posted by Cerbero1000 (Post 2013370)
Solved. All works perfectly!

Good to hear! What did you have to do?

Also, I forgot that I fixed and uploaded a new version where thumbnails should work correctly. Not sure how I forgot that.... :cool:

matthewhotdude 03-31-2010 01:42 PM

Quote:

Originally Posted by Null Parameter (Post 2013446)
I haven't tested this, but others have used it successfully.

Where do I do that?

Sorted!

Thanks great mod works perfect

Null Parameter 03-31-2010 03:13 PM

Quote:

Originally Posted by matthewhotdude (Post 2013452)
Where do I do that?

Sorted!

Thanks great mod works perfect

Great!

siliconfinance 04-03-2010 06:45 AM

Quote:

Originally Posted by Null Parameter (Post 1997777)
That is currently an option in the vB4 version, but not in this one. If there's demand for it, I could probably port that functionality back here as well.

:up:^Pie^3

If you did it, it would make a lot of people :D

Cybershaolin 04-04-2010 07:51 PM

1 Attachment(s)
Very nice hack but I have a problem with it. I use "First Attachment as the option for displaying the thumbnail but whenever the user does not have any attachments in the thread, nothing shows in the forum column. No thread icon or no "Nothumb.jpg" image even if I have define to use one image if there is none uploaded by the user. The path for nothumb.jpg is correct.

The result is not really nice since it only shows thumbnails for users who have attachments and it shows empty spots everywhere else. So, all the thread icons have disapeared and/or no "Nothumb.jpg" image is showing. I used to have what you see on the first picture but now I have what you see on the second picture.

Why is it doing that and am I the only one for which this is happening?

I chose automatic template edits in the options but, if I decide to choose to do manual edits for the templates, where are they? There is nothing in the readme talking about manual template edits besides those if you upgrade from a previous version.

Cybershaolin 04-06-2010 02:56 AM

I found out what's happening:

1- If you use the option "First Attachment: If the user adds an attachment to the thread, the first image attachment will be used as the thumbnail."
- The thumbnail is diplayed correctly as shown in my previous post in the attached screenshots.
- There is nothing else shown if no attachment is present, No "Nothumb.jpg" picture or no thread icon, just a blank space, again, as shown in my previous post in the attached screenshots.

2- If you use the option "First Image In Post: If the user adds an image into their post, via [IMG] tags, then the first image in the post will be used as the thumbnail."
- The thumbnail is diplayed correctly in the forum.
- If no attachment is present, then the picture "Nothumb.jpg" picture displays correctly if we choose to display it or the thread icon also displays correctly if this option is retained.

Therefore, for me, only the option "First image in Post" works correctly for the thread icon or the "Nothumb.jpg" picture to appear when there is no IMG tag in the post.

The problem is that I don't want to use this option or the URL option either. I want to use the option "First Attachment"! So is there a fix for this? And finally, is it possible to get the template manual edits?

Cybershaolin 04-09-2010 06:16 PM

That would be nice to get some kind of answer on the bug I'm experimenting.

Null Parameter 04-09-2010 07:20 PM

Quote:

Originally Posted by Cybershaolin (Post 2018483)
That would be nice to get some kind of answer on the bug I'm experimenting.

It would be nice if people realized that developers don't surround their lives around a single project. Seriously, if people can't have patience, then I'm just going to mark this as Not Supported and be done with it, especially since I don't even have a vBulletin forum anymore and I'm doing this ONLY for you.

I uploaded a new version that should fix this issue, but again, since I don't have a forum of my own anymore, I have no way to actually test it.


You should theoretically be able to extract the template edits yourself from the product file, just as easily as I could, but because I'm just that nice, here they are....
  • In editpost, find <!-- / subject field --> and put this below it:
    Code:

    <if condition="$isfirstpost AND $showthumbnailedit">
                    <if condition="$vbulletin->GPC[advanced]">
                    <input type="hidden" name="desc_adv_thumb" value="1" />
                    </if>
            <table cellpadding="0" cellspacing="0" border="0" style="margin-bottom:$stylevar[formspacer]px\">
            <tr>
                <td class="smallfont" colspan="3">Thumbnail URL:</td>
            </tr>
            <tr>
                <td><input type="text" class="bginput" name="thumbnailurl" value="$threadinfo[thumbnailurl]" size="50" maxlength="250" tabindex="1.5" title="" /></td>
            </tr>
    </table>
    </if>

  • In newthread, find <!-- / subject field --> and put this below it:
    Code:

    <if condition="$showthumbnailedit"><table cellpadding="0" cellspacing="0" border="0" style="margin-bottom:$stylevar[formspacer]px"><tr><td class="smallfont" colspan="3">Thumbnail URL:</td></tr><tr><td><input type="text" class="bginput" name="thumbnailurl" value="$threadinfo[thumbnailurl]" size="50" maxlength="250" tabindex="1.5" title="" /></td></tr></table></if>
  • In threadbit, find
    Code:

    <if condition="$show[threadicons])>
            <td class="alt2"><if condition="$show[threadicon]><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /></if></td></if>

    and replace it with
    Code:

    <if condition="$show[threadicons]">
        <td class="alt2" align="center" valign="middle">
                <if condition="$thread[thumbnaildisplay] AND (($vbulletin->options[thread_thumbnails_sticky] == '1') OR !$thread[sticky]))>
                        <a href="showthread.php?t=$thread[threadid]">
                          <img src="$thread[thumbnailurl]" alt="" border="0" width="$thread[thumbnailwidth]"/>
                        </a>
                <else />
                    <if condition="$show[threadicon]>
                    <img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
                    </if>
                </if>
        </td></if>

    Truthfully, this one's a little rough, but it should be right.

Cybershaolin 04-10-2010 01:45 AM

Thanks for the update but this does not resolve the "First attachment" option. There is still nothing that shows if no attachment is there. There is no thread icon or nothumb.jpg picture showing depending on what I want to be displayed.

Also, in your last template edits, for threadbit, when I change it according to what you are saying, it vbulletin does not want to update it saying there are errors. Having no coding skills, I'm back to square one.

It's such a nice hack, just too bad that it's not working entirely. I hope that you can still fix the bugs but without vbulletin to test, I have no idea how you can manage to do it. Therefore if you don't update it anymore, I guess you're right and you should think about marking it as not supported.

siliconfinance 04-12-2010 06:21 AM

Just out of curiosity, could you make it possible to display a thumbnail of the first image displayed in a thread and if there is none, then display a thumbnail of the attached image.

So based on this page:
http://www.vbulletin.com/docs/html/t...e_conditionals

Code:


<If condition="there is an image in IMG tags in the first post">Display a thumbnail of that image in the forum display</if>
 
<else />
 
<if condition="there is an image attached to the first post of a thread">Display a thumbnail of that image in the forum</if>
 
<else />
 
Display default thumbnail NoImage.jpg


bada_bing 04-12-2010 05:22 PM

I just noticed a bug which does the following on my site.

In the admincp in feature Show in what forums? I have forum ID 225 which means that the thread thumbnail option should only be available in forum 225 and not others is not working, in fact it shows up in just about every forum???????
What is the deal with this? I am running vb 3.8.3

AllinJac 04-12-2010 11:27 PM

Quote:

Originally Posted by Null Parameter (Post 2018510)
It would be nice if people realized that developers don't surround their lives around a single project. Seriously, if people can't have patience, then I'm just going to mark this as Not Supported and be done with it, especially since I don't even have a vBulletin forum anymore and I'm doing this ONLY for you.

I uploaded a new version that should fix this issue, but again, since I don't have a forum of my own anymore, I have no way to actually test it.


You should theoretically be able to extract the template edits yourself from the product file, just as easily as I could, but because I'm just that nice, here they are....

WOW...

I do not think anyone responded to your statement... Do they not read it or do they not really care???

Just wanted to tell you that I use this product and I APPRECIATE your efforts on this project even though you do not have vBulletin site anymore...

If you need to test it I would be willing to give you access to my test site as well as testing it on my live board!

Hope this helps you out and again THANK YOU for taking your time to offer a FREE product to us all!

Cybershaolin 04-13-2010 12:56 AM

Uninstalled since what I need is not working. Period.

AllinJac 04-13-2010 05:01 AM

Quote:

Originally Posted by Cybershaolin (Post 2020253)
Uninstalled since what I need is not working. Period.

To bad it is not working for you... It is working just fine for me... Looks absolutely great, especially since this is a FREE plugin that you do not have to pay for!

Maybe you are missing the point... If you are patient and as for help the right way maybe you will get the answers you are looking for... And if not then oh well uninstall...

THIS IS A FREE FORUM for us to add products to our site... No need to be harsh... PERIOD...

MrRem 04-13-2010 07:32 AM

Would there be a chance of allowing more than one default image.
So if a user didnt put in a thumbnail image, it would pull a random image from a group of 10?

default1.jpg
defaultt2.jpg
etc

picks one and displays that.

Cybershaolin 04-13-2010 11:56 AM

Quote:

Originally Posted by AllinJac (Post 2020339)
To bad it is not working for you... It is working just fine for me... Looks absolutely great, especially since this is a FREE plugin that you do not have to pay for!

Maybe you are missing the point... If you are patient and as for help the right way maybe you will get the answers you are looking for... And if not then oh well uninstall...

THIS IS A FREE FORUM for us to add products to our site... No need to be harsh... PERIOD...

Wow, if it's working for you fine man. For the situation I described it's not for me, that's it. No need to repeat the same thing over and over. Nobody's was rushing anybody here and yes it's a free forum with a liberty of free speech from everybody so relax, take your pills and get a life.

bada_bing 04-13-2010 12:07 PM

Quote:

Originally Posted by bada_bing (Post 2020030)
I just noticed a bug which does the following on my site.

In the admincp in feature Show in what forums? I have forum ID 225 which means that the thread thumbnail option should only be available in forum 225 and not others is not working, in fact it shows up in just about every forum???????
What is the deal with this? I am running vb 3.8.3

Any help with this please..


All times are GMT. The time now is 04:40 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.01775 seconds
  • Memory Usage 1,872KB
  • 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
  • (7)bbcode_code_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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