Your Account
    Log into your account here:
       Forgot Password

    Not registered? Sign Up for free
    Registration allows you to keep track of all your content and comments, save bookmarks, and post in all our forums.

Take me to last unread post.

Subscribe to topic Low Bandwidth

Down to Quick Reply
Displaying Page 2 of 2

1 | Last     Previous
Xeta Posted: 00:27 Jun02 2011 Post ID: 3011192
Xeta
Beneta
AvatarMember
Posts: 6,133
Post Likes: 79
0
+
Come on Mark, if ZetaBoards can do it then you can too!
ozzo said:xeta actually makes a lot of sense most of the time

if everyone agreed with him more often we wouldnt have this problem
Reply Quote & ReplyMulti Quote
Forgoten_Scars Posted: 23:17 Mar05 2013 Post ID: 3221933
Forgoten_Scars
Orbis terrarum est mei
AvatarMember
Posts: 14,835
Post Likes: 28
0
+
This messed up page numbering system is getting to me, so try this. And I'm terrible at regex, so there might be an error in here somewhere.

Add a new text field to wherever you store the topics, and concatenate the following string onto it whenever someone views it.

::$USERID-$LASTPOSTID::

Preg match to see if their data already exists in the string. If so;

$text = preg_replace("/::".$USERID."\-(.*?)::/is", "::".$USERID."-".$LASTPOSTID."::", $text);

When the page loads and you're ready to add the hash onto the URL, pull the data out of the string. There's probably an easier way to do this, but oh well. :L

$urlHash = explode(" ", str_replace("::", "", str_replace("::::", " ", $lastView['lastView'])));

foreach($urlHash as $urlHash2){
if(preg_match("/".$USERID."\-(.*?)/is", $urlHash2)){
$urlHash3 = explode("-", $urlHash2);
echo "#".$urlHash3[1];
};
};

And look through this. SC has a bad habit of stripping characters such as backslash. My code will probably come out messed up.

« Last edited by Forgoten_Scars on Mar 6th 2013 »
Reply Quote & ReplyMulti Quote
testuser Posted: 11:06 Mar07 2013 Post ID: 3222303
testuser
and then there will be cake.
AvatarAdmin
Posts: 2,123
Post Likes: 194
0
+
Thanks for the bump. Not sure about your idea above but I have put something in place.
Clicking the 'NEW' icon now should take you to the page of the thread with the oldest unread post on it.
balthiersbit said:.. oh poop I lost my balls ..


If this post is irrelevant to the topic please ignore it.
It may be a test and it may be deleted shortly.


Reply Quote & ReplyMulti Quote
Displaying Page 2 of 2

1 | Last     Previous
Subscribe to topic Low Bandwidth

Currently viewing this thread:
REPLY IN THIS THREAD
Smilies, click to use

You must be logged in to reply:
Username: 
Password:   
Forgot password? Click here to get it resent to you.
Sign Up Register for free.

Users under 13 are not eligible to post on the SuperCheats forums.

Post Top
Click to close