The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Which of these code changes are 'safe'/correct?
I am trying to change the page a user is sent to after replying to a thread.
With help from members Merk and Andreas I have located the bit of the newreply.php file which I need to change, in particular this bit: $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$newpost[postid]#post$newpost[postid]"; which is half way ish down this bit of code: PHP Code:
$vbulletin->url = 'my own url'; in the php code bit and it works fine. However I am worried about the other bits of code in the original file above the hook location, so am wondering whether I need to add any of that in my plug-in? Or will what I have done only effect the line I want it to? Sorry if its obvious! |
#2
|
||||
|
||||
The other code is simply building different urls depending on certain conditions - if you always want it to go to your url then you don't need to worry.
|
#3
|
||||
|
||||
Thanks Paul.... I'm not so sure now - I thought it just went to the last post regardless? But thinking about it, what happens if someones replying to a thread but in the meantime it gets locked, they hit reply and don't have the permissions so then what? Will it 'break' that bit of code? :-/
|
#4
|
|||
|
|||
The code dealing with $vbulletin->url has nothing to do with closed threads.
The logic is as follows: Is the thread visible (not moderated) or is the user a moderator? YES! --> Go to that post if its 'after' your last read post in that thread, otherwise go to the newest unread post NO! --> The thread went into the moderation queue and the user cant see the thread again, so redirect to the forum. I see no reason modifying your url wont change anything. |
#5
|
||||
|
||||
Quote:
Thanks Merk.. So you give my code change a thumps up ? Sorry to double check every last detail - I just dont want to break anything :bunny: |
#6
|
|||
|
|||
The only way you'll learn is when you break something. Ive had a few 'oh shit looks like im rolling back to last nights backup' moments
Looks fine. |
#7
|
||||
|
||||
lol don't say that you'll give me a heart attack!
Thanks for checking it over (Im sure I'll get to the 'oh shit' stage one day too!) |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|