vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Display Enhancements - Collapsable First Post using AJAX (or Last Post!) (https://vborg.vbsupport.ru/showthread.php?t=145187)

magnus 05-23-2007 10:58 AM

Quote:

Originally Posted by Barakat (Post 1253201)
no its not an external release but they are useing your hack on thier site ...
its so nice
http://www.vbhacks-germany.org/forumdisplay.php?f=109

Oh, woops. I misunderstood, sorry! ;)

Advocate1 05-25-2007 02:23 PM

Hi, you've created nice hack!
Is there any way to limit chars or words in $post[message] @ vbpost_postbit?

e39m5 05-25-2007 08:56 PM

Advocate1's suggestion brings up a good point, but I think it is something that should be user defined in the CP rather than admin defined. It really gets into user preference and usability. I also don't believe an update like this would affect loading time or bandwidth usage.

e39m5

Bonee70 05-31-2007 11:43 PM

Hmmm, when I click on the icon nothing happens.

Mousover shows me "Click here to read last post" ...


http://www.the-european-football-lea...splay.php?f=13

magnus 06-01-2007 04:57 PM

Quote:

Originally Posted by Bonee70 (Post 1258661)
Hmmm, when I click on the icon nothing happens.

Mousover shows me "Click here to read last post" ...


http://www.the-european-football-lea...splay.php?f=13

You didn't upload the vbulletin_vbpost.js or jquery.js to your clientscript folder. Re upload all of the product files to the proper locations.

Bonee70 06-01-2007 09:11 PM

Thx Magnus, sometimes I just have hot air in my head.... working fine now!

SemperFideles 06-04-2007 07:26 AM

OK, first of all, really great MOD!

I have only one problem:
1. I set the option to view the Last Post when the user clicks the + sign.
2. When I'm in forum display, the + sign pulls up the Last Post.
3. When I use the Today's Posts or New Posts features (which uses search.php), the + sign works but it displays the First Post

Is there a way to fix the search results? Does the search results even use the threadbit template? I can't even find in the templates where your Product has modified the Templates. I tried manually editing them as indicated in your instructions and the + sign appeared but didn't work. I unedited the files and wen back to automatic updating of the Templates and it works but as indicated above.

SemperFideles 06-04-2007 07:48 AM

Incidentally, I agree with others that it would be awesome if there could be two plus signs - one for the first post to dropdown and another for the last post to dropdown.

magnus 06-04-2007 11:51 AM

Quote:

Originally Posted by SemperFideles (Post 1260887)
Is there a way to fix the search results? Does the search results even use the threadbit template? I can't even find in the templates where your Product has modified the Templates. I tried manually editing them as indicated in your instructions and the + sign appeared but didn't work. I unedited the files and wen back to automatic updating of the Templates and it works but as indicated above.

This is by design. The search results SQL doesn't contain all the necessary information to display anything other than the first post, so regardless of what you've selected within the AdminCP, anything involving the search results will always display first post.

It's something that may possibly be worked in later. If you wish to change the template layout, the template you're looking for is vbpost_postbit. As for trying to find changes made by the automatic template edits, you can't. They are done on-the-fly.

anzo 06-04-2007 02:32 PM

hmm... I've installed everything as it was instructed, but it doesn't work!
I don't even see the "+" signs...

http://latforums.lv/forum1.html

I'm using Aria skin and vBSEO,
maybe it has something to do with it?

magnus 06-04-2007 04:37 PM

Quote:

Originally Posted by anzo (Post 1261033)
hmm... I've installed everything as it was instructed, but it doesn't work!
I don't even see the "+" signs...

http://latforums.lv/forum1.html

I'm using Aria skin and vBSEO,
maybe it has something to do with it?

No, I checked your site. It's working. You just haven't uploaded the images to the correct folders.

On your forum, it looks like they should be uploaded to the /17_lat/ directory.

Once done correctly, you should be able to access both images at:

http://latforums.lv/17_lat/expand.gif
http://latforums.lv/17_lat/expand_collapsed.gif

anzo 06-04-2007 07:26 PM

https://vborg.vbsupport.ru/external/2007/06/4.png
Thank You! :)

magnus 06-04-2007 10:25 PM

best. picture. ever.

:)

Evaporate 06-06-2007 06:02 PM

Brilliant.

Simple but effective. I haven't tried it with lots of traffic yet but should I guess actually reduce database load.

SemperFideles 06-08-2007 04:38 AM

Quote:

Originally Posted by magnus (Post 1260953)
This is by design. The search results SQL doesn't contain all the necessary information to display anything other than the first post, so regardless of what you've selected within the AdminCP, anything involving the search results will always display first post.

It's something that may possibly be worked in later. If you wish to change the template layout, the template you're looking for is vbpost_postbit. As for trying to find changes made by the automatic template edits, you can't. They are done on-the-fly.

I'm sorry magnus to bother you if you covered it previously. I tried searching for the term I was using.

When I click on Today's Posts, the results display not only the title of all the threads (if I click on the thread titles I'm taken to the first post). But, each thread listing also contains a clickable icon to "View Last Post".

Thus, it seems that the search results are, in fact, returning the Thread ID and Post ID of bost the first and last posts for each thread in the list. I'm not sure I understand, then, when you say that it doesn't contain "necessary information" to display anything other than the first post.

When I click on a particular forum for instance, it seems like the only thing I see are the thread title (which I can click on for the first post) and a clickable icon to "View Last Post". Thus, like search results, the forum listing seems to contain thread id and post id for each thread.

Why, on the one hand, does the forum listing contain the information needed while, on the other, the search results do not?

magnus 06-08-2007 01:57 PM

Quote:

Originally Posted by SemperFideles (Post 1263885)
I'm sorry magnus to bother you if you covered it previously. I tried searching for the term I was using.

When I click on Today's Posts, the results display not only the title of all the threads (if I click on the thread titles I'm taken to the first post). But, each thread listing also contains a clickable icon to "View Last Post".

Thus, it seems that the search results are, in fact, returning the Thread ID and Post ID of bost the first and last posts for each thread in the list. I'm not sure I understand, then, when you say that it doesn't contain "necessary information" to display anything other than the first post.

When I click on a particular forum for instance, it seems like the only thing I see are the thread title (which I can click on for the first post) and a clickable icon to "View Last Post". Thus, like search results, the forum listing seems to contain thread id and post id for each thread.

Why, on the one hand, does the forum listing contain the information needed while, on the other, the search results do not?

There's no (easily) available way to pull the first unread postid within search. So, to prevent accidental breakage, search results were restricted to firstpostid. Yes, they can display lastpostid. It was just simpler, at the time, to just force forstpostid. My logic was that someone searching was looking for something specific, and generally, that information would be found in the first post.

If you want lastpostid results within search, edit the Make changes to 'threadbit' template plugin.

FIND:
PHP Code:

            if (THIS_SCRIPT == 'search')
            {
                
$postidtype 'firstpostid';
                
$titlephrase $vbphrase['first_post'];
            } 

REPLACE WITH:
PHP Code:

            if (THIS_SCRIPT == 'search')
            {
                
$postidtype 'lastpostid';
                
$titlephrase $vbphrase['last_post'];
            } 

This will only work for firstpostid and lastpostid. It will not work for the first unread post.

Quickness 06-08-2007 02:12 PM

Thanks for this awesome mod -- clicks install

macshrine 06-18-2007 10:23 PM

Love it, great job! :)

Terrasoft 06-29-2007 07:11 AM

Its weird, the hack works great but not in the search feature. The pluses are there, but when they are clicked on...nothing happens. I installed it and had to do the manual template edits and nothing...any suggestions?

magnus 06-29-2007 10:37 AM

Quote:

Originally Posted by Terrasoft (Post 1278999)
Its weird, the hack works great but not in the search feature. The pluses are there, but when they are clicked on...nothing happens. I installed it and had to do the manual template edits and nothing...any suggestions?

You're using the latest version and you had to use manual template edits? That's weird..

Browse to your search page, click view source, and make sure the javascript is being loaded. That's the culprit 99.9% of the time, especially with manual edits.

Terrasoft 06-29-2007 11:44 AM

Hmm let me check that then. Ill also try turning manual edits off and let it work from there.

So yeah, I am still having this error even though it calls the javascript and all the correct automatic templates are being run. Any clue?

Terrasoft 06-29-2007 01:00 PM

I wonder, Im using the thread prefix hack which also requires you to edit the threadbit template, would this affect it in any way?

gim 06-29-2007 11:17 PM

Very very very goooood! :D

Magnumutz 06-30-2007 06:07 AM

Very nice... I just installed and i , and my users, love it.
*Clicks Install*

Terrasoft 07-01-2007 08:40 PM

Magnus, with the PM I sent you...I gave you a name of a hook that was being run under search_results_query_thread under the Thread Prefixes hack. Well I just tried disabling that hook and now it works perfectly, however if possible...itd be awesome to be able to use both of those hooks as the prefix in the search area is an extremely useful resource as well.

keyness 07-01-2007 09:30 PM

That's a great mod! Thank you!

MDK-Indy 07-02-2007 01:37 AM

Nice Hack :up:

But i have a error.

If i klick at the "+" then open the Ajax window and approx. after 1 sec change the view to the completely Thread.

Whats wrong?

Greeting Indy

nymyth 07-02-2007 03:59 PM

2 quick fixes ( you dont have to follow them to have it working) - I made these changes to get a valid XHTML 1.0 Transitional.

1. In the plugin "Make changes to 'threadbit' template"

Look for this:
Quote:

$vbulletin->templatecache['threadbit'] = preg_replace($find, $match[0] . $match[1] . ' ".(($thread[\'open\'] != 10) ? ("<img id=\"vbpostimg_$thread[' . $postidtype . ']\" src=\"$stylevar[imgdir_button]/expand.gif\" onclick=\"return vbpost_get($thread[' . $postidtype . '])\" onMouseOver=\"this.style.cursor=\'pointer\';\" title=\"' . construct_phrase($vbphrase['click_here_to_read_the_x'], $titlephrase) . '\" />") : (""))."', $vbulletin->templatecache['threadbit']);
replace with:
Quote:

$vbulletin->templatecache['threadbit'] = preg_replace($find, $match[0] . $match[1] . ' ".(($thread[\'open\'] != 10) ? ("<img id=\"vbpostimg_$thread[' . $postidtype . ']\" src=\"$stylevar[imgdir_button]/expand.gif\" onclick=\"return vbpost_get($thread[' . $postidtype . '])\" alt=\"' . construct_phrase($vbphrase['click_here_to_read_the_x'], $titlephrase) . '\" />") : (""))."', $vbulletin->templatecache['threadbit']);
I took out the onMouseOver and changed TITLE to ALT.

magnus 07-02-2007 05:16 PM

Quote:

Originally Posted by MDK-Indy (Post 1280953)
Nice Hack :up:

But i have a error.

If i klick at the "+" then open the Ajax window and approx. after 1 sec change the view to the completely Thread.

Whats wrong?

Greeting Indy

I'll need to see an example of what's happening to better understand what needs to be looked at.

baghdad4ever 07-02-2007 06:12 PM

thanks magnus

can you make it apear only to members not to guest??

is it make load on server or not???

tokenyank 07-04-2007 11:28 AM

Hey Magnus, I love this hack and have had it on for a few days now so I'm sad to report that I've had to take it off...

I've been getting reports of people getting:
Code:

Fatal error: Call to undefined function: fetch_coventry() in /home/mumsonli/public_html/forums/usercp.php(499) : eval()'d code on line 18
errors.

Their user groups are members and super mods whilst admin and mods do not get the error..

This manifests when you want to change your usertitle, when you click save, you get the above error, but what you've just 'saved' has saved anyway so the information is still being written to the DB despite the fatal error.

I've tried both the creation of the plugin and the repair of database as suggested back in May but to no avail. Unfortanatly, I've had to disable it and hope for a fix, though considering that this seems to affect the minority, I'm not holding my breath! :(

Thanks anyway!

tokenyank 07-04-2007 11:34 AM

Curiouser and curiouser!

Ok, with product enabled, error triggered.

Product disabled, error goes away but drop down still works! :confused:

In my product management, I've disabled your mod, simply because I didn't want to unisntall it should a fix come out. Thinking that disabling it would make it unusable (the clue is in the name! :) ) AND since the error went away, I thought all was good... Until I checked active topics and the + is still there and it is still clickable and it still shows the posts it was supposed to

So, I have an error that is intermittent not only for me, but for those that installed it, AND when disabled still runs!

You code hardcore mate! ;)

Seriously though, ermm... What's the story? :P

magnus 07-04-2007 03:38 PM

tokenyank, be sure you're disabling the entire product not just a plugin. If you're disabling a product and it's still active, suffice to say, you've got a larger problem elsewhere. The processing of plugins/hooks/etc. is handled exclusively by the core of vBulletin.

As for the original problem you're having, a few others have reported the same error however it's completely random (so far) as to who is affected. It's one of those things I can't really track down unless I could replicate the error and attempt to debug it.

It has no rhyme or reason, it's across a couple different vB versions, different mods installed on each forum -- no discernable pattern. I'll keep looking, though.

tokenyank 07-04-2007 03:52 PM

I figured it was intermitten as it has been installed for days now and this is the first time a member said anything.

And, since it doesn't effect me, I never caught it so I can't say for certain that it hasn't always existing, but I'm pretty sure that it didn't.

The only other AJAX thing I have installed is ajaxReg - Ajax Registration, with instant field checking. But since they don't share any templates or whatever, I doubt there's a conflict.

alessai 07-04-2007 05:39 PM

have a suggestion :

an option to make this hack work in certian grups only because the thing i use hack that limit the views for the visitors and the problem through this hack they can see the thred and the limition hack doesnt catch them

raiderlax 07-05-2007 06:12 AM

Doesn't work for me for vb 3.6.7 ?

raiderlax 07-05-2007 06:13 AM

Doesn't work for me for vb 3.6.7 ?

magnus 07-05-2007 04:26 PM

Quote:

Originally Posted by raiderlax (Post 1283243)
Doesn't work for me for vb 3.6.7 ?

1/ No reason to double post.
2/ It's been tested on 3.6.7 and shown to work fine.
3/ I can't really help you if I don't know the problem, can I?

raiderlax 07-05-2007 06:23 PM

Quote:

Originally Posted by magnus (Post 1283609)
1/ No reason to double post.
2/ It's been tested on 3.6.7 and shown to work fine.
3/ I can't really help you if I don't know the problem, can I?

Hey sorry about the double post, don't know how that happened,

anyways I installed it on my forum www.talkfitness.org and nothing shows up on the showthread, what should I do?

magnus 07-05-2007 06:52 PM

Quote:

Originally Posted by raiderlax (Post 1283717)
Hey sorry about the double post, don't know how that happened,

anyways I installed it on my forum www.talkfitness.org and nothing shows up on the showthread, what should I do?

Well, off the bat, it doesn't appear you've actually installed the modification. The files jquery.js and vbulletin_vbpost.js are not present in your /clientscript/ directory. Nor are any of the associated image files located in the correct directories.

So, either you didn't install the modification correctly or you removed it. Both which prevent me from being able to find out what the problem is based off the description of "nothing shows up".


All times are GMT. The time now is 01:05 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.01765 seconds
  • Memory Usage 1,851KB
  • 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
  • (2)bbcode_php_printable
  • (13)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