HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Question related to the most recent posts block..

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#78031 (In Topic #16013)
Avatar

Community saint

I modified mine so it looks better (to me).  But I was wondering if there is something in ocportal that marks what the last post in a thread a member read was?    I'd like to set up those links to the newest posts to go to the page/post that was the last one a user read.  Right now if you click on one, it goes to the first post, and that just isn't efficent.

Thanks
Paul

Paul
Back to the top
 
Posted
Rating:
#78032
Avatar

Community saint

Isn't this is what you mean?



Clicking on an arrow in a topic thread takes the user to the first UNREAD post, which is effectively what you're after … ??

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#78033
Avatar

Community saint

No, I meant the block you usually see on the first page.  But looking at the link that the down arrow provides does give the answer.    Just make that block go to &type=#first_unread&id=xx#first_unread …

Thanks.

Paul
Back to the top
 
Posted
Rating:
#78034
Avatar

Community saint

It would be easy to just hard code it…  figuring out which function to modify in what file and which functions to properly form the link… that's a different story.   :ninja:

Paul
Back to the top
 
Posted
Rating:
#78035
Avatar

Community saint

Resolved:

In copy main_forum_topics.php from sources/blocks  to sources_custom/blocks.

Then in the file look for this line (about line 158):

Code

               //$topic_link=$GLOBALS['FORUM_DRIVER']->topic_link($topic['id'],$forum_name);

and replace it with:
               

Code

$topic_link=build_url(array('page'=>'topicview','id'=>$topic['id'],'type'=>'first_unread'),get_module_zone('topicview'));
               $topic_link->attach('#first_unread');

Now if a you use the main_forum_topics block, when a user clicks on the topic for one of the latest posts, they will go straight to the latest post in that thread (according to what they have read so far).

Paul
Back to the top
 
Posted
Rating:
#78036
Avatar

Community saint

Don't need it at the mo, but I'll file that away.

thanks

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#78084
Avatar

Will pass an extra var into the template for v8 to allow this as a template change.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: