UBB.Dev
Posted By: JustDave [UBBT 6.1] Anchors Away... - 09/27/2002 2:07 AM
Allen requested this and with some trial and error I think I got it working.


What this will do is return you to the post in question after editing or creating the post. Consider this beta so expect bugs. (although I think it's working pretty well right now)


This is also in use here at ThreadsDev. The text file is attached.



I've updated the instructions to include what DeepHull has pointed out.

Attached File
57689-anchorsaway.txt  (101 downloads)
Posted By: AllenAyres Re: [UBBT 6.1] Anchors Away... - 09/27/2002 4:52 AM
Yes!
Posted By: DeepHull Re: [UBBT 6.1] Anchors Away... - 09/27/2002 12:29 PM
JustDave,

Thanks for the mod! I found a small discrepency in your instructions and figured I would let ya know (maybe my board is missing the proper code, who know?).

In step 2 you instruct the following template files with:

[]
editpost_nopoll.tmpl
editpost_withpoll.tmpl
modifypost_approve.tmpl
modifypost_makesticky.tmpl
modifypost_makeunsticky.tmpl
previewedit_approve.tmpl
previewedit_makesticky.tmpl
previewedit_makeunsticky.tmpl
previewedit_preview.tmpl

find this line:

<input type="hidden" name="Number" value="$Main" />

and change it to this:

<input type="hidden" name="Number" value="$Main" />
<input type="hidden" name="Main" value="$Main" />

[/]

However, in those particular files I could not find the line you suggested, however I did find:

code:
<input type="hidden" name="Number" value="$Number" />



So I just nestled the added line after that. Thanks again for the mod!
Posted By: DeepHull Re: [UBBT 6.1] Anchors Away... - 09/27/2002 12:38 PM
Oh, one question, I am fairly new to UBBThreads, can you tell me where the message...

[] Your post has been entered. In a moment you will be automatically returned to the forum. [/]

...can be found? I would like to change it to:

[] Your post has been entered. In a moment you will be automatically returned to your message. [/]
Posted By: JustDave Re: [UBBT 6.1] Anchors Away... - 09/27/2002 1:30 PM
The text will be located in the language files. I'm not sure which language file would contain that text but you can try the "generic.php" language files first. Just going over the file names may give you a idea of what to open.
Posted By: JustDave Re: [UBBT 6.1] Anchors Away... - 09/27/2002 1:33 PM
Your right about the code being different. I guess depending on the file it can have your line or the one I showed. No matter what the line has for the variable it is the line that sets the "Number" variable so as long as we follow that rule we'll be ok.

Thanks for pointing that out. I did it all rather fast... lol and while running live here.
Posted By: JoshPet Re: [UBBT 6.1] Anchors Away... - 10/03/2002 3:16 AM
The instructions say:

-------------------------------------------------------------------------------
find this line:

<input type="hidden" name="Number" value="$Main" />

or this line:

<input type="hidden" name="Number" value="$Number" />

and change it to this:

<input type="hidden" name="Number" value="$Main" />
<input type="hidden" name="Main" value="$Main" />

(some templates have more than one occurance)
-------------------------------------------------------------------------------


I believe is should be this:

-------------------------------------------------------------------------------
find this line:

<input type="hidden" name="Number" value="$Main" />

or this line:

<input type="hidden" name="Number" value="$Number" />

and AFTER it ADD this:

<input type="hidden" name="Main" value="$Main" />

(some templates have more than one occurance)
-------------------------------------------------------------------------------


When I did it the first way... when I edited posts both the reply and the main post got changes.

Also.... this doesn't seem to work for the first post of a new thread yet. Doesn't seem to here either.

Otherwise is now working great. Thanks!
Posted By: JustDave Re: [UBBT 6.1] Anchors Away... - 10/03/2002 3:20 AM
I didn't update the instructions but thought that I had summed it up above in reply to DeepHull's post.


I'll append the instructions now with your block. Thanks.



As far as new posts go I'll have to look at updating that. I was only thinking about replies when I did it. Will probably have to add some modifications to addpost.php to take into account new threads.
Posted By: Astaran Re: [UBBT 6.1] Anchors Away... - 10/04/2002 12:16 AM
Thx, something like this is highly requested on our boards. But if only works if the answer and the posted that ist replied to are on the same site. Or i'm missing something?
It would be really nice if it would work when you reply to a posting on site 1 of a thread and it redirects you to site 5 where the answer occurs.
© UBB.Developers