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)

JimmDaBimm 04-23-2007 01:24 AM

Ajax ftw->installed

Thank you ^^

magnus 04-24-2007 11:32 AM

To anyone experiencing the conditional errors when evaluating the templates, please try the following.

In your AdminCP > vBulletin Options > Collapsable First Post using AJAX Options:

Set the Forum Exclusion List to 0 (zero).

Now, resubmit the template modifications and see if you still receive the error. I'm trying to track down what would be causing this error for some of you, but I can't seem to replicate it on my development forum unfortunately.

This is what's holding up the next release, as I'd like to have this resolved before I put another version out there.

Thanks!

magnus 04-24-2007 04:10 PM

Update:
1.2.1 BETA : PRIVATE BETA. NOT RELEASED.
  • Will no longer show expand icon next to thread redirects.
  • Added ability to display first unread post.
  • Completely revamped the automatic template editing system. Should now be able to make template edits to even the most modified templates as well.
  • Fixed a couple non-breaking typos.
  • Included JavaScript in USERCP_SHELL to allow expand/collapse of subscribed threads.
  • Added a hover title to the expand icon to inform the user what they can expect when clicking it.
THIS VERSION IS NOT AVAILABLE FOR PUBLIC DOWNLOAD!
[hr]-[/hr]
I NEED TESTERS!

While this isn't a major revision, it hopefully addresses the few sporatic issues a few users have been reporting. I'm hoping the alleviate the need to manually edit templates with my revamped automatic template editing system. I will not be releasing any new features until these problems are resolved!

The pre-requisites for testers are as follows:
  • Previous automatic template edits did not work for you.
  • (optional) You receive a conditional error when applying template edits manually.

If you meet any of the above criteria and wish to lend a hand, let me know. Thanks!

THIS VERSION IS NOT AVAILABLE FOR PUBLIC DOWNLOAD!

Tralala 04-24-2007 04:14 PM

Just installed this... working great. (Tested on Safari.)

Awesome work... thanks, magnus!

A few issues/suggestions:

I see the expand/collapse button appears next to Subscribed Threads in the User CP. But the button doesn't work. If at all possible, could it be made to work? And if not, is there a way to remove the button from appearing next to those threads in the User CP? Since the button doesn't work, after all.

I'd love to see some more options in AdminCP, like the ability to turn off avatars in the expanded post. That'd be a lot easier than manually going in and editing vbpost_postbit.

I'd also like to see an option for the button to only appear next to new/unread threads, and not others. And when the button is clicked, that the status (of the very first post, at least, or whatever post is being displayed) gets marked as "read."

magnus 04-24-2007 04:25 PM

Quote:

Originally Posted by Tralala (Post 1234767)
I see the expand/collapse button appears next to Subscribed Threads in the User CP. But the button doesn't work. If at all possible, could it be made to work? And if not, is there a way to remove the button from appearing next to those threads in the User CP? Since the button doesn't work, after all.

Good catch, easy fix. Thanks!

Quote:

Originally Posted by Tralala (Post 1234767)
I'd love to see some more options in AdminCP, like the ability to turn off avatars in the expanded post. That'd be a lot easier than manually going in and editing vbpost_postbit.

Hrm. Personally, I feel this is unneeded because editing the template is so simple. However, it seems the majority of people here want specific template modifications (ie. quote, reply, edit) so this may be a way to please everyone.

I'll see what I can do.

Quote:

Originally Posted by Tralala (Post 1234767)
I'd also like to see an option for the button to only appear next to new/unread threads, and not others. And when the button is clicked, that the status (of the very first post, at least, or whatever post is being displayed) gets marked as "read."

This is similar to something that was brought up previously that I've been working on. vBulletin provides the following functions:

mark_thread_read();
mark_forum_read();

There's no specific way to mark a POST as read, so unless you want the entire THREAD marked as read, I don't really see a way to do this without basically adding an new post database table to tracking the read status of each post.

What I have done, though, is added the ability to select "First Unread Post" to be displayed. So, when clicked the user will see the first unread post since their last visit. There's also an option in the AdminCP now to Mark Thread as Read when this post is viewed. So, it's configurable to that extent.

Tralala 04-24-2007 04:34 PM

That sounds great, magnus. Thanks so much for your reply and consideration! Looking forward to your updates.

In the meantime I have gone in and tweaked vbpost_postbit to my liking. Mainly just simplifying it, removing the extras I didn't think this needed (location, post count, user title, etc.) Looking great.

Another minor request. When hovering over the button, right now I am seeing the default/standard thread preview popup. (Same as if I'd hover over the thread title itself.) I think it would make more sense if the popup said this instead:

"Click here to see the _x_ post"

(where x = "first," or "last," or "first unread," depending on the Admin CP or User CP settings for this hack.)

So users can better understand what's going on with this new feature.

magnus 04-24-2007 04:56 PM

Quote:

Originally Posted by Tralala (Post 1234782)
Another minor request. When hovering over the button, right now I am seeing the default/standard thread preview popup. (Same as if I'd hover over the thread title itself.) I think it would make more sense if the popup said this instead:

"Click here to see the _x_ post"

(where x = "first," or "last," or "first unread," depending on the Admin CP or User CP settings for this hack.)

So users can better understand what's going on with this new feature.

Good idea. Just added that real quick. :up:

ragtek 04-24-2007 04:57 PM

hrhr
waiting vor update*g*

rjmjr69 04-24-2007 10:43 PM

Quote:

Originally Posted by magnus (Post 1234585)
To anyone experiencing the conditional errors when evaluating the templates, please try the following.

In your AdminCP > vBulletin Options > Collapsable First Post using AJAX Options:

Set the Forum Exclusion List to 0 (zero).

Now, resubmit the template modifications and see if you still receive the error. I'm trying to track down what would be causing this error for some of you, but I can't seem to replicate it on my development forum unfortunately.

This is what's holding up the next release, as I'd like to have this resolved before I put another version out there.

Thanks!

Still getting these errors when setting forum to 0

The following error occurred when attempting to evaluate this template:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /includes/adminfunctions_template.php(3596) : eval()'d code on line 1

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /includes/adminfunctions_template.php(3596) : eval()'d code on line 15

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.


I would be willing to do your beta for you seeing how I am one of the people having this issue

magnus 04-25-2007 01:17 PM

Quote:

Originally Posted by rjmjr69 (Post 1234977)
Still getting these errors when setting forum to 0

The following error occurred when attempting to evaluate this template:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /includes/adminfunctions_template.php(3596) : eval()'d code on line 1

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /includes/adminfunctions_template.php(3596) : eval()'d code on line 15

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.


I would be willing to do your beta for you seeing how I am one of the people having this issue

Great! I'll send you a copy via PM. Also, before installing the beta -- try the attached threadbit. See if that resolves the errors.

rjmjr69 04-25-2007 06:42 PM

Quote:

Originally Posted by magnus (Post 1235249)
Great! I'll send you a copy via PM. Also, before installing the beta -- try the attached threadbit. See if that resolves the errors.


Ok that template now works fine but it still does not update the post count.

magnus 04-25-2007 06:46 PM

Post count? What post count? I'm glad the errors are gone, but could you try the Forum Exclusion List and tell me if it's actually working now? Just put any active Forum ID and see if the expand/collapse icons still display.

rjmjr69 04-25-2007 07:35 PM

I'm sorry the THREAD VIEW count is not moving. The beta installed without a hitch. Still no thread view count going up but it did install without any issues and is working.

Thanks

magnus 04-25-2007 09:09 PM

So far so good. We should be ready for a release soon. Yay! :p

magnus 04-25-2007 09:12 PM

Ok, for those receiving errors when modifying the templates manually. See the original post for updated template modifications. The only modifications were to the threadbit template. Nothing else has changed.

Slave 04-26-2007 03:28 AM

If a thread is also a poll, how about having an option of either showing the poll or posts? .. maybe make it so clicking the poll icon shows the poll?

Have a think :)

apdcanari 04-26-2007 09:58 AM

Quote:

Originally Posted by magnus (Post 1232439)
This hack is for 3.6. I haven't tested it on 3.5, but I don't see why it wouldn't work.

It would take 5 minutes for you to try it.

Ouip, but doesn't work in 3.5 (queries).

C?dric :rolleyes:

magnus 04-26-2007 01:10 PM

Quote:

Originally Posted by apdcanari (Post 1235701)
Ouip, but doesn't work in 3.5 (queries).

C?dric :rolleyes:

Good to know. I've released a vB3.5 compatible version. You can find it here.

Domski 04-26-2007 07:24 PM

Nevermind me.... i put the images in the ~/images/buttons folder and not the ~/images/MY TEMPLATE/buttons

Mark.B 04-26-2007 09:35 PM

Nice work.

One thing I've noticed, is that the vB drop down menu that should pop up when you click on the username, only works in Firefox and not IE...in IE it just takes you to the full profile page.

I've tried copying the original code from postbit_lagacy and it still doesn't work.

Anyone know why this is?

magnus 04-26-2007 10:06 PM

Quote:

Originally Posted by Mark.B (Post 1236102)
Nice work.

One thing I've noticed, is that the vB drop down menu that should pop up when you click on the username, only works in Firefox and not IE...in IE it just takes you to the full profile page.

I've tried copying the original code from postbit_lagacy and it still doesn't work.

Anyone know why this is?

Nice find. I just verified it on my setup, too. I'll take a look at it.

Mark.B 04-27-2007 06:14 AM

I'm also finding that the exclude forums feature isn't working, I have used manual template edits but I can't get that to work. The admin panel stores the forum IDs but the feature still operates in those forums.

GrendelKhan{TSU 04-27-2007 12:19 PM

AWESOME!!

installed. working great 3.6.0



FYI: couldn't do the automatic though...didn't work. I think its because if you vbplaza has slight change in the div tag for:

$thread[title_editable]
<div>


(that's the only difference I noticed)

GrendelKhan{TSU 04-27-2007 12:20 PM

ps. any chance for a vbadvanced cmps module? :)

subnet_rx 04-27-2007 02:29 PM

great hack, waiting for 1.2.1 to come out.

magnus 04-27-2007 03:24 PM

Quote:

Originally Posted by Mark.B (Post 1236272)
I'm also finding that the exclude forums feature isn't working, I have used manual template edits but I can't get that to work. The admin panel stores the forum IDs but the feature still operates in those forums.

Yea, I was worried about that. It works fine with the automatic template edits, but for some reason the array isn't being passed when using manual edits. The next release should allow you to successfully use the automatic template edits, which in turn, will allow the forum exclusion to work correctly as well.

I think I can probably get 1.2.1 out today.

magnus 04-27-2007 03:26 PM

Quote:

Originally Posted by GrendelKhan{TSU (Post 1236384)
AWESOME!!

installed. working great 3.6.0



FYI: couldn't do the automatic though...didn't work. I think its because if you vbplaza has slight change in the div tag for:

$thread[title_editable]
<div>


(that's the only difference I noticed)

Yea, rjmjr69 uses vBPlaza and he beta tested v1.2.1. The automatic template edits are working for him now. :)

magnus 04-27-2007 03:26 PM

Quote:

Originally Posted by GrendelKhan{TSU (Post 1236385)
ps. any chance for a vbadvanced cmps module? :)

I don't understand, what would a module of this do for vBA CMPS?

magnus 04-27-2007 03:52 PM

Update:
1.2.1
  • Will no longer show expand icon next to thread redirects.
  • Added ability to display first unread post.
  • Completely revamped the automatic template editing system. Should now be able to make template edits to even the most modified templates as well.
  • Fixed a couple non-breaking typos.
  • Included JavaScript in USERCP_SHELL to allow expand/collapse of subscribed threads.
  • Added a hover title to the expand icon to inform the user what they can expect when clicking it.

[hr]-[/hr]
I would seriously suggest removing any manual template edits you may have performed for the previous versions (except modified vbpost_postbit templates). This new version employs advanced automatic template editing logic which should have absolutely no problem performing the edits to modified templates, except in the most rare circumstances (note: I've yet to find one).

To upgrade, simply overwrite the existing files and import the product as usual.

TTG 04-27-2007 04:07 PM

Updated to 1.2.1 and now have two ajax icons alongside latest posts ?

category 04-27-2007 04:18 PM

clicks install also is there anything that can make the user column where they put avator smaller and all their info thinner

magnus 04-27-2007 04:18 PM

Quote:

Originally Posted by TTG (Post 1236519)
Updated to 1.2.1 and now have two ajax icons alongside latest posts ?

You didn't remove the manual template edits. Look for expand.gif in your threadbit template, and remove that line.

magnus 04-27-2007 04:19 PM

Quote:

Originally Posted by category (Post 1236526)
clicks install also is there anything that can make the user column where they put avator smaller and all their info thinner

You can edit the vbpost_postbit template to look however you like.

Mark.B 04-27-2007 04:30 PM

Couple of points I have found on the new release which I hope are helpful. (I am now on automatic template edits)

1) I can't seem to make it go to the first unread post, it still does the first post in the thread for me.

2) Although excluding certain forums works in forumdisplay, it doesn't work in search_results.

3) Guests viewing thread lists that do not have rights to view posts still get the icon, but when they click the icon it just gives the "loading" gif permanently. With manual edits I was able to fix this using a simple template conditional, however with auto-edits it's going to need something in the plugin code. Again would be better if the icon was hidden.

magnus 04-27-2007 05:19 PM

[QUOTE=Mark.B;1236535]Couple of points I have found on the new release which I hope are helpful. (I am now on automatic template edits)

Quote:

1) I can't seem to make it go to the first unread post, it still does the first post in the thread for me.
Are you sure there's a post in the thread marked as unread? It's weird that it would go to the first post because if you have 'First Unread Post' set and there is no unread posts, it defaults to the Last Post.

I'll look at it.

Quote:

2) Although excluding certain forums works in forumdisplay, it doesn't work in search_results.
This is known, I'm trying to find a way to filter search results through the exclusion filter.

Quote:

3) Guests viewing thread lists that do not have rights to view posts still get the icon, but when they click the icon it just gives the "loading" gif permanently. With manual edits I was able to fix this using a simple template conditional, however with auto-edits it's going to need something in the plugin code. Again would be better if the icon was hidden.
Never thought about that. Easy fix. I'll take care of it.

Mark.B 04-27-2007 05:28 PM

Quote:

Originally Posted by magnus (Post 1236558)

Are you sure there's a post in the thread marked as unread? It's weird that it would go to the first post because if you have 'First Unread Post' set and there is no unread posts, it defaults to the Last Post.

Yes, I've done quite extensive testing with it.

As it happens, I cannot make it do "last post" either, it always does first post no matter what the admin cp setting.

Mark.B 04-27-2007 05:30 PM

Aha...got it.

It works in forumdisplay but not in search_results.

In search_results it always goes to the first post regardless of the admin setting.

Mark.B 04-27-2007 05:33 PM

A small tweak that is really very minor but neatens things up a bit.....

Adding:
Code:

class=\"inlineimg\"
into the automatic template code for threadbit where the image is displayed will make the image line up neatly with any "view first unread" default vB images that may be next to it.

magnus 04-27-2007 07:06 PM

Quote:

Originally Posted by Mark.B (Post 1236570)
Aha...got it.

It works in forumdisplay but not in search_results.

In search_results it always goes to the first post regardless of the admin setting.

Yes, this is correct. By design, it will always return the first post in search_results. The information available in FORUMDISPLAY isn't necessarily availble in the search_results query. It's not that it can't be done, I'm just trying to keep the modification as evasive as possible when it comes to query manipulation.

I haven't written off the idea, I just won't release it until I know for certain it won't cause any future hiccups. :p

magnus 04-27-2007 07:06 PM

Quote:

Originally Posted by Mark.B (Post 1236572)
A small tweak that is really very minor but neatens things up a bit.....

Adding:
Code:

class=\"inlineimg\"
into the automatic template code for threadbit where the image is displayed will make the image line up neatly with any "view first unread" default vB images that may be next to it.

Good idea, thanks.


All times are GMT. The time now is 06:00 PM.

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.01804 seconds
  • Memory Usage 1,858KB
  • 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
  • (2)bbcode_code_printable
  • (21)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