vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Administrative and Maintenance Tools - [AJAX] Thread Bumping 1.1 (https://vborg.vbsupport.ru/showthread.php?t=137796)

sebbe 01-27-2007 10:00 PM

[AJAX] Thread Bumping 1.1
 
1 Attachment(s)
[AJAX] Thread Bumping 1.2

What is this?
This hack well let you bump threads and make them show up at the top of the forum again even though no new post has been added to it. This is done by simply double clicking in a cell on forumdisplay (see screenshots). On bump it will update the thread's lastpost date to the current time, the last post inside will not be affected.

Installation
See install.txt in the .zip archive. (~ 3 minutes)

Upgrade (from 1.0 to 1.1)
Revert the template "threadbit" and then repeat all steps in install.txt. Make sure to have the option "Allow Overwrite" checked when importing the product again. Also don't forget to overwrite the old threadbump.js with the new one.

Upgrade (from 1.1 to 1.2)
You need only import the product.xml found in the .zip package and make sure to have the option 'Allow Overwrite' set to Yes. No template edits required and no need to upload threadump.js.

Version 1.1
* Updates forumhome so the bumped thread will show up there, just as it should
* Correctly displays the new bumped thread for the bumper
* Correctly displays the new bumped thread under stickys in that forum, if there are any


Version 1.2
* Security fix


* Note
If you have the "separate stickys" hack installed you can edit the plugin executed at hook "forumdisplay_start" and replace $tstickys = 0; with $tstickys = 1;. I haven't tested this but that should work.

Pleas click INSTALL if you're using this hack.

sebbe 01-28-2007 09:32 PM

*Reserved*

Jon_Simmonds 01-28-2007 09:41 PM

nice idea :)

instaled

FleaBag 01-28-2007 10:33 PM

Can I limit a thread bump to thread starter, and once per x hours?

sebbe 01-28-2007 10:44 PM

Quote:

Originally Posted by FleaBag (Post 1169349)
Can I limit a thread bump to thread starter, and once per x hours?

At the moment no, but definitely possible features for next version, if more wants it that is.

Snake 01-28-2007 11:07 PM

Wow this is awesome!

Jorrit787 01-28-2007 11:48 PM

Why would you make it use AJAX if you can't satisfactorily do what you want it to do without refreshing the page? :rolleyes:

Hornstar 01-29-2007 07:22 AM

I have been waiting for this for so long. There is another one on vb, that Is working for 3.6.4 however it is a little buggy now as it was made for a much earlier version, and it doest work as good as this.

I would also love a debump feature. also a setting to debump it by x hours, days etc. with a limit of course, just incase a mod desides to debump it too much. (Limit set in admincp)

I know this may be a little hard, but it is something that I would love so much.

Thanks.

soulface 01-29-2007 08:47 AM

nice. installed. working fine but it should also update the last post info in FORUMHOME aswell.

sebbe 01-29-2007 11:15 AM

Quote:

Originally Posted by Jorrit787 (Post 1169398)
Why would you make it use AJAX if you can't satisfactorily do what you want it to do without refreshing the page? :rolleyes:

Because one can bump threads very quickly. In next release that's fixed ;)


Next version fixes the sticky bug so that it's placed below stuck threads, makes the title bold, adds new statusicon, replaces timestamp. So far also added the fix on FORUMHOME.

I'm a bit busy atm but it will be released any day soon.

nymyth 01-29-2007 06:07 PM

hmmm, when i bump a thread it goes to the top but doesnt stay there on refresh.....also it doesnt work well with "SEPERATE STICKYS" hack, because it bumps over that hack.....however problem is that it still wont stay at the top....any ideas?

Peace

lange 01-29-2007 06:36 PM

So, it doesnt stay on top after Maintenance/Update Counters/Rebuild Information Thread in AdminCp.

joopss 01-29-2007 06:36 PM

tenksss.......... :D

rmxs 01-29-2007 06:45 PM

Very good and usefull!

StrifeX 01-29-2007 06:47 PM

Awesome idea, I'll try it out next time a get a chance. :)

sebbe 01-29-2007 06:56 PM

Quote:

Originally Posted by nymyth (Post 1169952)
hmmm, when i bump a thread it goes to the top but doesnt stay there on refresh.....also it doesnt work well with "SEPERATE STICKYS" hack, because it bumps over that hack.....however problem is that it still wont stay at the top....any ideas?

Peace

The hack was made for vB 3.6.*, judging from your profile you have got 3.5.4, although I can't think of anything that would prevent it from working. If you have a heavily modified forumdisplay template, that might cause a minor problem, but only for the bumper and after page refresh it should still have updated the "lastpost" time for the thread. Are you saying it doesn't?

Quote:

Originally Posted by lange (Post 1169963)
So, it doesnt stay on top after Maintenance/Update Counters/Rebuild Information Thread in AdminCp.

Most certainly not, and imo it shouldn't. There has to be away to revert until "unbumping" is added. You don't bump a thread with the intention that it should stay on top forever. That makes no sense to me. In that case, the thread should be stuck instead.

nymyth 01-29-2007 06:57 PM

Sebbe, sorry i havent updated my profile, but i am running 3.6.4....forumdisplay has NOT been heavily modified at all....yeah im saying it doesnt update it

Peace

nymyth 01-29-2007 08:51 PM

wierd....it works now....

Peace

rmxs 01-30-2007 03:35 PM

Hello!!

I found one problem!

I have the hack Strike Through Closed Threads if the thread its closed the date mesed up with date codes! :(

If i disable it work good!

sebbe 01-30-2007 04:53 PM

Quote:

Originally Posted by rmxs (Post 1170620)
Hello!!

I found one problem!

I have the hack Strike Through Closed Threads if the thread its closed the date mesed up with date codes! :(

If i disable it work good!

Can you explain a little more detailed? Is it this hack you've installed?
https://vborg.vbsupport.ru/showthread.php?t=98980

Can you provide a link to your forum?

Martin-TMGRS 01-30-2007 05:11 PM

Nice hack, but I get an error

Line: 2483
Char: 30
Error: Expected `J`
Code: 0
URL: http://www.tmgrs.co.uk/boards/forumdisplay.php?f=4

sebbe 01-30-2007 05:44 PM

Quote:

Originally Posted by Martin-TMGRS (Post 1170696)
Nice hack, but I get an error

Line: 2483
Char: 30
Error: Expected `J`
Code: 0
URL: http://www.tmgrs.co.uk/boards/forumdisplay.php?f=4

I was not able to register (which was needed to see that foum). I just got stuck at choosing my birthdate, couldn't go on from there. Can you make an account for me so I can have a look?

rmxs 01-30-2007 06:48 PM

1 Attachment(s)
Quote:

Originally Posted by sebbe (Post 1170684)
Can you explain a little more detailed? Is it this hack you've installed?
https://vborg.vbsupport.ru/showthread.php?t=98980

Can you provide a link to your forum?

Yeap that its!

more details look attachment!

(also doenst work with this error on closed threads

rmxs 01-30-2007 06:54 PM

I install this one https://vborg.vbsupport.ru/showthread.php?t=122992 and works with this!

Maybe the other mod have problem with yours! :)

sebbe 01-30-2007 09:21 PM

Hack updated!

The actual AJAX move of the bumped thread should be flawless now. Also the update on forumhome.

nymyth 01-30-2007 11:22 PM

thanks for the update....still bumps to the top of the STICKYS too, (using the SEPERATE STICKYS HACK)

Peace

soulface 01-31-2007 08:03 AM

the new version still not updating last post info on FORUMHOME

sebbe 01-31-2007 09:03 AM

Quote:

Originally Posted by soulface (Post 1171154)
the new version still not updating last post info on FORUMHOME

Inside a forum, right click and "view source" and search for this
HTML Code:

onDblClick="bT('
Please print the whole line here, I want to see what's inside the bT() function. Also do you get any error messages?

nymyth 02-01-2007 01:17 PM

I uninstalled an redid all the steps....in firefox it doesnt bump at all, and in IE it doesnt bump but i get this error:

Line: 59
Char: 7
Error: 'innerHTML.lastChild' is null or not an object
Code: 0
URL: XXX

Any ideas?

TTG 02-01-2007 01:37 PM

I've been using this one on 3.6.4 and it works well .. might give this one a go if all the bugs are worked out.

nymyth 02-01-2007 01:40 PM

yeah i used to use that one too...i liked the idea of it being ajax ready.....

Peace

FSHD 02-01-2007 03:55 PM

This is really nice. I'd like to have it admin access only.

sebbe 02-01-2007 05:17 PM

Quote:

Originally Posted by nymyth (Post 1172080)
I uninstalled an redid all the steps....in firefox it doesnt bump at all, and in IE it doesnt bump but i get this error:

Line: 59
Char: 7
Error: 'innerHTML.lastChild' is null or not an object
Code: 0
URL: XXX

Any ideas?

Please show me your threadbit template.

Quote:

Originally Posted by FSHD (Post 1172200)
This is really nice. I'd like to have it admin access only.

You can restrict it to admins only by putting 6 in the setting Thread bumping > Usergroups. See the screenshot.

nymyth 02-01-2007 10:00 PM

Code:

<tr>
        <td class="alt1" id="td_threadstatusicon_$thread[realthreadid]">
                $thread[openclose_editable]
                <img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_statusicon_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" />
        </td>
        <if condition="$show['threadicons']">
                <td class="alt2"><if condition="$show['threadicon']"><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /><else />&nbsp;</if></td>
        </if>

<if condition="$show['sticky']">
        <td class="stuck" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
<else />
<td class="alt1" id="td_threadtitle_$thread[realthreadid]" title="$thread[preview]">
</if>

                $thread[title_editable]
                <div>
                        <if condition="$show['moderated'] OR $show['deletedthread'] OR $show['paperclip'] OR $show['subscribed'] OR $show['sticky'] OR $show['rexpires']">
                                <span style="float:$stylevar[right]">
                                        <if condition="$show['rexpires']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/expires.gif" alt="<phrase 1="$thread[expiredate]" 2="$thread[expiretime]">$vbphrase[expires_on_x_y]</phrase>" /> </if>
                                        <if condition="$show['moderated']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/moderated_small.gif" alt="<phrase 1="$thread[hiddencount]">$vbphrase[x_moderated_posts]</phrase>" /> </if>
                                        <if condition="$show['deletedthread']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/trashcan_small.gif" alt="<phrase 1="$thread[deletedcount]">$vbphrase[x_deleted_posts]</phrase>" /> </if>
                                        <if condition="$show['paperclip']"> <a href="#" onclick="attachments($thread[threadid]); return false"> <img class="inlineimg" src="$stylevar[imgdir_misc]/paperclip.gif" border="0" alt="<phrase 1="$thread[attach]">$vbphrase[x_attachments]</phrase>" /></a> </if>
                                        <if condition="$show['subscribed']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" alt="$vbphrase[you_are_subscribed_to_this_thread]" /> </if>
                                        <if condition="$show['sticky']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/sticky.gif" alt="$vbphrase[sticky_thread]" /> </if>
                                </span>
                        </if>
                        <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]" id="thread_gotonew_$thread[realthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
                        $thread[movedprefix]
                        $thread[typeprefix]
                        $thread[moderatedprefix]
                        <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]"<if condition="$show['gotonewpost']"> style="font-weight:bold"</if>>$thread[threadtitle]</a>
                        <if condition="$thread['pagenav']">$stylevar[dirmark]<span class="smallfont" style="white-space:nowrap">(<img class="inlineimg" src="$stylevar[imgdir_misc]/multipage.gif" alt="$vbphrase[multipage_thread]" border="0" /> $thread[pagenav]<if condition="$show[pagenavmore]"> ... <a href="showthread.php?$session[sessionurl]t=$thread[threadid]&amp;page=$thread[totalpages]$thread[highlight]">$vbphrase[last_page]</a></if>)</span></if>
                </div>
       
                <if condition="$show['rmanage']"><div class="smallfont"><span style="float:$stylevar[right]"><a href="postings.php?$session[sessionurl]do=editthread&amp;t=$thread[redirectthreadid]">$vbphrase[manage]</a></span></div></if>
                       
                <div class="smallfont">
                        <if condition="$show['threadratings'] AND $show['threadrating']"><span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" border="0" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span></if>
                        <if condition="$show['guestuser']">
                                $thread[postusername]
                        <else />
                                <span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]', '_self')">$thread[postusername]</span>
                        </if>
                </div>
               
                <if condition="$show['unsubscribe']">
                        <div class="smallfont">
                                <a href="newreply.php?$session[sessionurl]do=newreply&amp;t=$thread[threadid]" rel="nofollow">$vbphrase[reply]</a> |
                                <a href="subscription.php?$session[sessionurl]do=removesubscription&amp;return=ucp&amp;t=$thread[threadid]" rel="nofollow">$vbphrase[unsubscribe]</a>
                        </div>
                </if>
               
        </td>
       
        <if condition="$show['threadmoved']">
        <td class="alt2" align="center">-</td>
        <else />
<!--THREAD BUMPING-->
<if condition="$vboptions[tbonoff] && is_member_of($bbuserinfo, $tbugroups)">
        <if condition="$show['sticky']">
                <td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>" onDblClick="bT('$thread[threadtitle]','$thread[realthreadid]', '$foruminfo[forumid]', '$pagenumber', '1', '$tstickys', '$stylevar[imgdir_misc]', '$thread[lastposter]', '$thread[lastpostid]', '$thread[threadiconid]');">
        <else />
                <td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>" onDblClick="bT('$thread[threadtitle]','$thread[realthreadid]', '$foruminfo[forumid]', '$pagenumber', '0', '$tstickys', '$stylevar[imgdir_misc]', '$thread[lastposter]', '$thread[lastpostid]', '$thread[threadiconid]');">
        </if>
<else />
        <td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>">
</if>
<!--THREAD BUMPING-->
                <div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap">
                        $thread[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$thread[lastposttime]</span></if><br />
                        <phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase>  <a href="showthread.php?$session[sessionurl]p=$thread[lastpostid]$thread[highlight]#post$thread[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
                </div>
        </td>
        </if>
       
        <if condition="$show['notificationtype']">
                <td class="alt1"><div class="smallfont">
                        <label for="sub$subscribethread[$threadid]">$thread[notification]</label>
                </div></td>
                <td class="alt2"><input type="checkbox" name="deletebox[$subscribethread[$threadid]]" id="sub$subscribethread[$threadid]" value="yes" /></td>
        <else />
                <td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><a href="#" onclick="who($thread[threadid]); return false;">$thread[replycount]</a></if></td>
                <td class="alt2" align="center">$thread[views]</td>
                       
                <if condition="$show['forumlink']">
                        <td class="alt1"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a></td>
                </if>
        </if>
       
        <if condition="$show['inlinemod']">
                <td class="alt1">
                        <input type="checkbox" name="tlist[$thread[realthreadid]]" id="tlist_$thread[realthreadid]" value="$thread[checkbox_value]" <if condition="$show['disabled']">disabled="disabled"</if> />
                </td>
        </if>
</tr>


sebbe 02-01-2007 10:34 PM

All Users who upgraded to version 1.1
Please re-upload the threadbump.js again from the new zip archive. I mistakenly added an old version of it. I apologize for this.

blogtorank 02-01-2007 11:07 PM

Great JOB sebbe!!!

nymyth 02-02-2007 07:46 PM

uploaded the new .js but still giving me the same error....

Peace

sebbe 02-02-2007 08:06 PM

Quote:

Originally Posted by nymyth (Post 1173219)
uploaded the new .js but still giving me the same error....

Peace

Hmm.. If you use IE you might have to clear your browser cache. It would be weird if you get this error
Code:

Line: 59
Char: 7
Error: 'innerHTML.lastChild' is null or not an object
Code: 0
URL: XXX

again if you have uploaded the new threadbump.js as that code is no longer on line 59.

BobbyBig 02-04-2007 03:22 PM

Very usefull - Installled.

A little Bug: If using a different Style, it uses the wrong Statusicon on updating the Date (thread_dot_new.gif).

regards

BobbyBig 02-05-2007 12:57 PM

Another Bug:

When Bumping a Thread which includes aöü in the Title, it changes the Title:

"Schönste" is changing to "Schönste". -> also in the database!

Please provide me with a fix for that.
Thank you.


All times are GMT. The time now is 05:19 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.02595 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
  • (1)bbcode_html_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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