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.


Can't Use Virtual Forum Root in Recent Post Blocks...

Login / Search

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

Community saint

It laughs at me...

Greetings,

Alright I have set up a new zone and have begun using the awesome virtual root feature to make the different forum boards per zone, and for the most part, it works well. However, I have uncovered some problems that I can seem to get around. Since I am tired of these said problems laughing at me, I thought I'd come in here and ask.

1.) I set up on my zone, "Legends of Nor'Ova: Era of Torment", a latests forum posts block to display beneath my "news" block. I set it to pick up the forum posts from all forums that I assigned to (and moved to as sub-forums) the forum Legends of Nor'Ova: Era of Torment. This said forum is the virtual root for the forums I am using for this zone.

However I have noticed the following two issues…

a.) I made a post, responding to a thread. The Latest Post box refused to pick up the new post I made.

b.) Clicking on the link to go read a post from the Latest Post box does take you to the thread, but it ignores the virtual root. Instead it shows the forum root itself as clickable from the breadcrumb line.

I have removed the Latest Post box for now, hoping to get this resolved before I have a bunch of members getting lost within the forum root instead of happily navigating the virtual root… and stuff.

2.) The being faced with Forum Root versus Virtual Root problem is also present when using Search. Whether it be a site search or a forum search itself, if you click on the Go To button, you get taken to the thread with the forum root in the breadcrumb instead of stopping at the virtual root in the breadcrumb.

I find these things somewhat odd, as when you go to the virtual root via the link I made, you cannot expose the forum root in the breadcrumb. It all just works and works pretty well (except for the fact that I have to maintain still the menu for zone Forum because within a post you are nolonger using zone Era of Torment menus but are using zone Forum menus.)

Thanks in advance for the help, and again, I am very pleased with having the ability to do these things such as virtual roots for forums and what not… just trying to get around these little bugs.

Legends of Nor'Ova: A site powered by ocPortal; home of the Legends of Nor'Ova tabletop RPG wiki and community.

Like ocPortal? Want to thank Chris and gang somehow? Then help out in the chat room! It really needs your help! Just open it in a tab everytime you open your web browser, and when you hear a "ding", check it out!

"Those who want help should first be willing to give help."
Back to the top
 
Posted
Rating:
#60755
Avatar

1a- maybe you have date_key=firsttime instead of date_key=lasttime on the block.

1b- If you can get keep_forum_root into the URL on the page that shows the block, that should then carry through. So make sure your links to that page contain that parameter.

2- The solution to 1b may work. I think if you followed a link to a post that was under the virtual root it would behave normally, and if it was not under the virtual root then the virtual root would be ignored and the breadcrumbs would descent right down.


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
 
Posted
Rating:
#97354
Avatar

Well-settled

Sorry to drag an old post up, but I have this problem as well.
I have set up virtual roots on my site to have the look of two seperate forums, which seems to work from the links set up.

I also have these latest forum topics block in places on the site and when ever using them to view the topic, it just ignores the virtual rooting and adds the "forum home" to the breadcrumb trail which is exactly the part I don`t want users to see.

How can I add this part to the end of the url these are listed onto, do you mean change the links to these pages and add that to the end, as when clicking links to these I have added that to the end of the browser url manually and followed the links from the blocks and it still has the same path.

Chris Graham said

1b- If you can get keep_forum_root into the URL on the page that shows the block, that should then carry through. So make sure your links to that page contain that parameter.

They are placed on my sites start page, and also in the side_panel on the forumview area

Any help or pointers would be appreciated

Thanks Mark
Back to the top
 
Posted
Rating:
#97355
Avatar

Well-settled

Just wanted to add, that this is the same when viewing links from the forum menu, like

"Topics with unread-posts! etc etc, and even lists the breadcrumbs below the topics in this view (although a little hard to see on my site I accept)



Unless this reflects how I personally have accessed these topics does it?


Last edit: by kenno
Back to the top
 
Posted
Item has a rating of 5 (Liked by kenno)  
Rating:
#97357
Avatar

Ok, so I can confirm the issue with the forum news blocks.

Normally ocPortal has a special way of building up links that results in the keep_* parameters being propagated through. However, for forum stuff, it goes through the forum driver API (so not just ocPortal, other third party forums are handled there too), which means links are generated in a much more neutral way. That is, unless we specially tell the forum driver API that we want the link to come out as ocPortal-centric.

I've made some changes.
https://github.com/chrisgraham/ocPortal/commit/696605e151277a00325b4352b02060a0dfc1b397
Don't apply all this, just grab specifically the updated sources/blocks/<blockname>.php file. E.g. sources/blocks/main_forum_topics.php.

Unread topics runs for the whole forums, hence why any breadcrumbs are given globally. There are no plans to change that at the moment.


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
 
Posted
Rating:
#97368
Avatar

Well-settled

I will try these Chris.

Just so I am sure as I have never grabbed anything from this area before, basically I just create another blocks file for the ones I need to change and use on my site and add it to
/sources_custom/blocks files on my site?

Just to note Chris, the main_activities block also acts the same way as the forum topic blocks.


In regards to the forum notification links
Posts since last visit
Topics with unread posts
Recently-read topics

I am not so fussed about it showing the breadcrumbs underneath the topics in these areas (as I think this will be missed), it is more that when the user clicks on these topics (which they will, as most users navigate the forums this way), that once clicking these links the virtual forum rule is now not followed and then shows the forum root in the breadcrumb which is exactly what I am trying to get away from.
I have just been looking a little further into this and, forum searches seem to be hit and miss with which breadcrumbs it brings back.
For example I just searched through my own posts on my site through the profile area, and clicking the posts by the title it ignores the virtual rooting, but then clicking the "go to" icon, it respects this.
I guess this goes back to what runs through this forum driver and what does not.

If this is how it is then, thats fine we can still use this excellent feature.
So thanks for the changes you have made already to try and accommodate it.

Again the support on this site is second to none

Thanks Mark


**edit**
I have been thinking (scary I know :lol: ), I have been looking at the admin section Breadcrumb overrides, I can`t grasp exactly how to use this just yet, but could I maybe some how change the breadcrumb for the forum home to say one of my virtual rooted forums home, I know this would mean when viewing that actual forums home that there will be two identical links in the breadcrumb but I don`t think that would matter that much


Last edit: by kenno
Back to the top
 
Posted
Item has a rating of 5 (Liked by kenno)  
Rating:
#97369
Avatar

Just so I am sure as I have never grabbed anything from this area before, basically I just create another blocks file for the ones I need to change and use on my site and add it to
/sources_custom/blocks files on my site?

Everything I committed there will be in the next patch release, no need to put anything in an override. Just grab and overwrite the file for the block you need changing. Not all files, just specifically the block you are using.

Just to note Chris, the main_activities block also acts the same way as the forum topic blocks.

Ok I will take a look.

I am not so fussed about it showing the breadcrumbs underneath the topics in these areas (as I think this will be missed), it is more that when the user clicks on these topics (which they will, as most users navigate the forums this way), that once clicking these links the virtual forum rule is now not followed and then shows the forum root in the breadcrumb which is exactly what I am trying to get away from.
I have just been looking a little further into this and, forum searches seem to be hit and miss with which breadcrumbs it brings back.
For example I just searched through my own posts on my site through the profile area, and clicking the posts by the title it ignores the virtual rooting, but then clicking the "go to" icon, it respects this.

It's just you're pushing at the boundaries of what can be done. ocPortal gets you 90% of the way to isolating things, but running lots of sites with their own totally separated fully-featured forums within one site, it's a bit deep into crazy-complex-land territory, and I don't think much software can do that out-of-the-box perfectly. Maybe some software allows very simple embedded forums in different areas, but not a complete forum system.

I have been thinking (scary I know  ), I have been looking at the admin section Breadcrumb overrides, I can`t grasp exactly how to use this just yet, but could I maybe some how change the breadcrumb for the forum home to say one of my virtual rooted forums home, I know this would mean when viewing that actual forums home that there will be two identical links in the breadcrumb but I don`t think that would matter that much

That could work.


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
 
Posted
Item has a rating of 5 (Liked by kenno)  
Rating:
#97370
Avatar

main_activities block fix:
https://github.com/chrisgraham/ocPortal/commit/f9c61cd4940536313c4db08d20b590ca4bc6d1c3

that once clicking these links the virtual forum rule is now not followed

Actually this seemed to work when I tested just now.

For example I just searched through my own posts on my site through the profile area, and clicking the posts by the title it ignores the virtual rooting, but then clicking the "go to" icon, it respects this.

Actually you'll see I also changed sources/hooks/modules/search/ocf_posts.php in my previous commit. So I did catch this one actually.


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
 
Posted
Rating:
#97371
Avatar

Well-settled

Chris Graham said

I am not so fussed about it showing the breadcrumbs underneath the topics in these areas (as I think this will be missed), it is more that when the user clicks on these topics (which they will, as most users navigate the forums this way), that once clicking these links the virtual forum rule is now not followed and then shows the forum root in the breadcrumb which is exactly what I am trying to get away from.
I have just been looking a little further into this and, forum searches seem to be hit and miss with which breadcrumbs it brings back.
For example I just searched through my own posts on my site through the profile area, and clicking the posts by the title it ignores the virtual rooting, but then clicking the "go to" icon, it respects this.

It's just you're pushing at the boundaries of what can be done. ocPortal gets you 90% of the way to isolating things, but running lots of sites with their own totally separated fully-featured forums within one site, it's a bit deep into crazy-complex-land territory, and I don't think much software can do that out-of-the-box perfectly. Maybe some software allows very simple embedded forums in different areas, but not a complete forum system.


Chris

I would disagree here!!!
I would say ocPortal gets you 99.9% of the way there to isolate things (or it sure as hell will do now after all these recent changes you have just committed).
This virtual rooting is perfect for my site, and barr it maybe showing maybe the odd root forum home link here and there it is an amazing feature which is "out of the box" ready to use.
Some of the things that are in this CMS are amazing (the only small gripe would be finding them out and when I do, getting my teeny tiny brain to be able to use them :'( )

I will go ahead and make the changes and report back and let you know how they went.

Thanks again

Mark



Back to the top
 
Posted
Rating:
#97373
Avatar

Cool, glad you're happy with it. We hope to continue to get tutorials written for cases like this – Arvixe is sponsoring them on an ongoing basis and Steven Jarvis writing them. If you have ideas on generic things to get explained, please add issues to the ocPortal documentation project on the tracker.


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
 
Posted
Rating:
#97379
Avatar

Well-settled

I sure will do that Chris, does it matter how trivial some of the things I think need explaining to be?

I have added the fixes, but the side blocks when visiting from the home page for the first time seem to act as before (well first click anyway), do I need to some how change that link, as once visiting from the forums with the &keep_forum_* part in there it works and respects this.
So I am guessing I need to add this somehow from the start do I.

The forum search still seems to operate as before, even with the &keep_forum_* part in the url.

If it is at all easier to test and/or view on my site then that is not a problem.

Thanks Mark
Back to the top
 
Posted
Rating:
#97380
Avatar

The forum search still seems to operate as before, even with the &keep_forum_* part in the url.

If that's in the URL, I doubt it would not be working. However, if the virtual root is not above what you're looking at, perhaps that's why it can't use it?

If that's not it, see if you can spot a URL difference and let me know. There's no kind of memory, it's all in the URL.

As for your home page, I'm not sure your aim here. Normally the home page would naturally be expected to go to the root, and deeper pages on the site would have a virtual root. If you mean a zone's home page, you'd need to ensure any link to that zone has a custom link.


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
 
Posted
Rating:
#97382
Avatar

Well-settled

The layout of my site is that, I have virtual rooted two forums, to make it so that neither can be seen on either ones perceived root, I had to do it this way otherwise the first virtual rooted forum would be viewable as a forum on the main forum home which was not what I wanted if possible.

I then changed the links for the forum home, to my now virtual rooted forum and then added a forum home link to the other virtual rooted one in its zones start page

On first visiting my site to the start page, I have the side_forum_news and the main_forum_news showing, when following the links from here they do not respect any virtual root and act as normal.
Now if I do the same as above yet only visit the url in these blocks by for example going to the virtual rooted forum url first and then coming back it does respect this.
So I need a way of have that keep_forum in there in the first place (I think)



Regards the search, I think it might be because I did not add this file from gtihub, forum/pages/modules/topics.php

In the screen shot the only url that does not have the &keep_forum_* part in is the topic one circled


Would that tally up with that file ?
Back to the top
 
Posted
Rating:
#97383
Avatar

For search, it's this file sources/hooks/modules/search/ocf_posts.php. I have not gone through and tested this case, so I could have made a mistake, but I think I've fixed that right.

There is no way to set a default initial parameter without programming, but it's not too bad.
Here's a sources/hooks/systems/startup/default_parameters.php that injects a default parameter, value 12345.

Code

<?php

class Hook_startup_default_parameters
{
   function run()
   {
      $page=isset($_GET['page'])?$_GET['page']:'start';

      switch ($page)
      {
         case 'start':
            if (!isset($_GET['forum_root']))
            {
               $_GET['forum_root']='12345';
            }
            break;
      }
   }
}


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
 
Posted
Rating:
#97384
Avatar

^ post above edited, it's late ;)


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
 
Posted
Rating:
#97385
Avatar

Well-settled

Chris are you saying I have grab that sources/hooks/modules/search/ocf_posts.php file again and re-upload?, or did you mean you had not checked the original fixes?

Actually as you can gather I am just getting to grips with ocPortal, and come to think of it the way my site is set up Jean created me a landing page

Bulldog Owners

with a link to the rest of my site being

http://newocp.bulldogowners.co.uk/site/index.php?page=start

so maybe I can just tweak that link from the landing page with out the need for that default_parameters.php??
Back to the top
 
Posted
Rating:
#97386
Avatar

Well-settled

Do I need the topics one I mentioned as well before?
Back to the top
 
Posted
Rating:
#97387
Avatar

Yes if you have a landing page, that is a good solution.

The topics.php change was very minor and entirely unrelated to your search issue. It was actually related to birthdays.

Chris are you saying I have grab that sources/hooks/modules/search/ocf_posts.php file again and re-upload?

Yes. However if you did try this once and it still didn't work, it probably means I did something wrong.


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
 
Posted
Rating:
#97388
Avatar

Well-settled

So the link from the landing page just needs to have the keep_forum_root part in there, does it have to specify which one or actually specify any?

Yes I had already uploaded that file earlier, I was unsure if you had tweaked it again or not.

I am going to double check I did actually save that contents from gtihub to the uploaded file

Yes double checked, and it is still the same, maybe this link is something different?

That is the circled url in the image attached further above
View topic: Mark Testing - Bulldog Owners

Another thing what may or may not be worth mentioning is, that clicking these linkes in the search results always opens another tab in the browser, where as the one that respect the virtual rooting do not (like the "go to" icon etc)



Last edit: by kenno
Back to the top
 
Posted
Rating:
#97390
Avatar

So the link from the landing page just needs to have the keep_forum_root part in there, does it have to specify which one or actually specify any?

The one you want to be the default surely? I'm a bit too busy to study your situation in depth though, so perhaps I am not following properly.

You are right that search was still wrong:
https://github.com/chrisgraham/ocPortal/commit/7d09d767b2959bb6fece6b94f051d0befff13c53


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
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Expand