The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Admins creates threads which are actually links Details »» | |||||||||||||||||||||||||||
Admins creates threads which are actually links
Developer Last Online: Nov 2024
Ok this is a really neat idea requested by e_dove here:
https://vborg.vbsupport.ru/showthrea...threadid=36862 New version![/b] Now includes links to Delete Thread as well as Stick/Unstick Thread. If you already installed the hack, open forumdisplay.php and replace this: Code:
if (empty($thread['link'])) { $thread['link'] = "showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]"; } Code:
$thread['deletelink'] = ''; if (empty($thread['link'])) { $thread['link'] = "showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]"; } else { $thread['link'] = $thread['link']; if ($bbuserinfo['usergroupid'] == 6) { $thread['deletelink'] = "(<a href=\"postings.php?s=$session[sessionhash]&action=deletethread&threadid=$thread[threadid]\">delete</a> | <a href=\"postings.php?s=$session[sessionhash]&action=stick&threadid=$thread[threadid]\">stick / unstick</a>)"; } } It gives admins the option to create threads, in any forum, which are actually links to someplace else. Really basic, when admins create a new thread they have a box to enter URL. If the box isn't empty, whenever the thread is accessed the user will be redirected to that URL. Using vbHacker as always, edits newthread.php, showthread.php and forumdisplay.php. Adds a field to thread table, creates a new template and edits 2 existing templates. Have fun. Show Your Support
|
Comments |
#52
|
|||
|
|||
FireFly, I installed this hack correctly but when i create a new thread and fill the url field, actually doesn't happen anything....
FoA, the URL text field at first time contains the string \"\" ... is it normal ? Actually, I verified by phpMyAdmin, the thread row has the 'link' field empty. I double-checked in particular the hack applied to newthread.php but everything seems well done... Thank you for any help. |
#53
|
|||
|
|||
Quote:
As you can see, I used the txt version output of vbhacker procedure... with the known problem of '"\' ... I made the correction to the new template and everything went fine. Probably that double slash/quote created some kind of problem when writing the url into db... Now it's ok. Thanks again. |
#54
|
|||
|
|||
Would be good to know how you did that.. because I'm having the same problem.
details |
#55
|
|||
|
|||
Just figured it out before the PM came from you
So here tis. You need to change your newthread_linkoption to this: PHP Code:
|
#56
|
||||
|
||||
I just installed the vbhacker version of this and I must have missed something. Where is the box to put the URL in? And where is the delete button for the link? Can someone please tell me what I missed or am missing?
|
#57
|
|||
|
|||
Quote:
Same problem here |
#58
|
|||
|
|||
ok, fixed!
i found a lil bug, it doesn't update the "new thread" template the hack searches for this line but thats wrong!! PHP Code:
to make this hack work do the following, search for this line in your "new thread" template: PHP Code:
PHP Code:
next open the newly created "newthread_linkoption" template and replace the coding with this: PHP Code:
|
#59
|
|||
|
|||
This modification to postings.php will prevent sticking/unsticking
a thread-which-is-a-link from going to the link URL when the stick/unstick action is performed. Find: Code:
eval("standardredirect(\"".gettemplate("redirect_sticky")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");"); Code:
if (empty($threadinfo['link'])) { eval("standardredirect(\"".gettemplate("redirect_sticky")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");"); } else { eval("standardredirect(\"".gettemplate("redirect_sticky")."\",\"forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]\");"); } with this and found it could be eliminated by using session[dbsession] in the URL for when the thread is stuck/unstuck. My forum didn't like me browsing with cookies I guess. |
#60
|
||||
|
||||
You lost me here on this one and on the dbsession part.
Quote:
|
#61
|
|||
|
|||
Quote:
these types of threads. I had an earlier modification to prevent the following: after initially creating the link thread, vB goes to the thread view but is redirected to the link. My preference is to go to the forum view. Firefly for whatever reason didn't use this in his latest update. My last post fixed a similar situation I didn't like. This with regard to sticking/unsticking the link thread. Same scenerio: if I stick an unstuck thread, vB goes to the thread view but is redirected to the link. My code modifications change that to the way I prefer. As far as that last bit, that was too vague--sorry. I don't know if I put the hack in incorrectly or I have a browser problem. But if I am browsing with cookies (where only 's=' without the sessionidi shows up in my address bar), trying to use the stick/unstick link takes me to an error window: Your session appears to be invalid. Click here to create a new session. If I browse without cookies, no error message. But I can eliminate the error all the time with the following code change in forumdisplay.php (taken from Firefly's first post). Code:
$thread['deletelink'] = ''; if (empty($thread['link'])) { $thread['link'] = "showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]"; } else { $thread['link'] = $thread['link']; if ($bbuserinfo['usergroupid'] == 6) { $thread['deletelink'] = "(<a href=\"postings.php?s=$session[sessionhash]&action=deletethread&threadid=$thread[threadid]\">delete</a> | <a href=\"postings.php?s=$session[dbsessionhash]&action=stick&threadid=$thread[threadid]\">stick / unstick</a>)"; } } I was a bit surprised no one has mentioned similar situations. But this would corrected it if they did. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|