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.


Forum block question

Login / Search

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

Community saint

Seems like I'm on a block rampage these days! ;)

Is there any way to change the title on the main_forum_topics and other related forum blocks? During the addition of the block, it's recommend in the helper to use ID's instead of forum names, however, this then produces (in my example): "Active topics in 1,2,3,4,6,10,11,12,13,14,15" as the title of the block.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#41006
Avatar

Hi,

We'll consider revamping this in the future but for now the only way to do it is with template editing.

You'll need to change the BLOCK_MAIN_FORUM_TOPICS template.

E.g.

Code

{+START,BOX,{$?,{$EQ,{FORUM_NAME},1\,2\,3\,4\,6\,10\,11\,12\,13\,14\,15},My Nice title,{!ACTIVE_TOPICS_IN,{FORUM_NAME*}}}}
   {CONTENT}
{+END}

(untested)


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:
#41015
Avatar

Community saint

Thanx Chris! Works like a dream.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#41016
Avatar

Community saint

Ah this looks like some thing I will use as well.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#41852
Avatar

Community saint

Hey Chris! Just wondering if something has changed in RC2 that would prevent this fixup from working. As of RC2, all the blocks I've used this on are back to displaying the ID and not the custom title.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#41853
Avatar

Hi,

Did you save your change into templates_custom? If not the upgrade could have overritten it.


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:
#41856
Avatar

Community saint

Hey Chris! Yes, verified on the server that the files are intact, templates_custom. Here is the relevant bit from one of 'em: (BLOCK_MAIN_FORUM_TOPICS.tpl)

Code

{+START,BOX,{$?,{$EQ,{FORUM_NAME},1\,11\,13\,15\,16\,12\,14\,19\,18\,17\,3\,2\,20},Recent Forum Activity,{!ACTIVE_TOPICS_IN,{FORUM_NAME*}}}}
   {CONTENT}
{+END}
and my block call:

Code

[block param="1,11,13,15,16,12,14,19,18,17,3,2,20" limit="10" hot="0" date_key="lasttime" username_key="firstusername"]main_forum_topics[/block]
and the resulting title

Code

Active topics in 1,11,13,15,16,12,14,19,18,17,3,2,20

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#41857
Avatar

Community saint

I remember it used to go by the last forum it was pulling from and I liked that better.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#41863
Avatar

Hi,

Yes I can confirm actually this has not been working since RC1. It'll be fixed in the next patch release, but the change is…

Change line 102 of sources/tempcode.php from:

Code

   $bits=preg_split('#(?<!\\\\)(\{(?=[\dA-Z\$\+\!\_]+[`%\*=\;\#~\^\|\'&/@]*))|(\,)|((?<!\\\\)\})#',$data,-1,PREG_SPLIT_DELIM_CAPTURE);
to:

Code

   $bits=preg_split('#(?<!\\\\)(\{(?=[\dA-Z\$\+\!\_]+[`%\*=\;\#~\^\|\'&/@]*))|((?<!\\\\)\,)|((?<!\\\\)\})#',$data,-1,PREG_SPLIT_DELIM_CAPTURE);
and line 425 from:

Code

            $literal=php_addslashes(str_replace('\}','}',str_replace('\{','{',$next_token)));
to:

Code

            $literal=php_addslashes(str_replace('\,',',',str_replace('\}','}',str_replace('\{','{',$next_token))));


Last edit: by Chris Graham


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:
#41865
Avatar

Community saint

Will that make it so it uses the title from the last one on the list like it did in 3.*?

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#41867
Avatar

Nope, that'll just fix the bug.

As I mentioned earlier in the topic, we accept there is scope for improving it - but it'd be a step forward not back to the v3 behaviour :).


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:
#41873
Avatar

Community saint

Hi Chris! Unfortunately that did not fix it. FYI: my line 425 was already set to what you suggested.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#41874
Avatar

Whoops, I did my usual trick of getting the from/to lines the wrong way around. Post now edited.


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:
#41875
Avatar

Community saint

LOL, and I tried that (swapping them) but only with the second one (425) and not the first….go figure.

Anyway, initial kick at the cat did not work again. I decided to start from scratch and cut and paste from your original suggestion, modified my block call to match the id's and voila! works. This leads me to believe that the list of forum ID's needs to be in chronological order and not random?

Thanx again Chris.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#41876
Avatar

needs to be in chronological order and not random?

Yeah. All the template change does is a dum compare :).


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:
#41878
Avatar

Community saint


Chris Graham said

Nope, that'll just fix the bug.

As I mentioned earlier in the topic, we accept there is scope for improving it - but it'd be a step forward not back to the v3 behaviour :).
Yep good point maybe have some kind of option when you set up the block for a title.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#41940

Fan in training

Just an add on to this problem (i think it would be included here) The installers java script for selecting what forum to use is not working.  Its not doing the switching to the version selection so its forcing the install to load the ocf one.
Back to the top
 
Posted
Rating:
#41942
Avatar

Community saint


tombomb said

Just an add on to this problem (i think it would be included here) The installers java script for selecting what forum to use is not working.  Its not doing the switching to the version selection so its forcing the install to load the ocf one.
yep you would be the third person who reported that :)
It should be fixed in rc3.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: