printer_friendly_block, Forcing a theme

Post

Posted
Rating:
#5152 (In Topic #1159)
Avatar
Standard member
supertramp4 is in the usergroup ‘Well-settled’
Hi,

I have installed the printer_friendly_block add-in,

Is it possible to force the printer_friendly_block
to use a different theme ?

Currently it opens a new window, and appends index.php?page=start&wide_print=1, but is it possible to modify this so that is forces a specific  template

IE  index.php?page=start&wide_print=1&keep_theme=print_theme

Where  and what would i need to edit to achieve this.

Many Thanks
Chris
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam)
#5153
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Either:

1) Just put out your own print link with something like <a href="{$SELF_URL*,0,0,0,keep_print=1,keep_theme=sometheme}">Print me</a>.

2) In the BLOCK_SIDE_PRINTER_FRIENDLY template change {URL} to {$EXTEND_URL,{URL},keep_theme=sometheme}.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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.
Online now: No Back to the top

Post

Posted
Rating:
#5165
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’
Chris, can you explain the advantage of using {$EXTEND_URL} over, let's say something like this:
{URL}&keep_theme=default

Also, is there a list somewhere of standard/advanced URL structures/parameters that Composr uses? I'm eager to learn them :)
Online now: No Back to the top

Post

Posted
Rating:
#5167
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’

Joe said

Chris, can you explain the advantage of using {$EXTEND_URL} over, let's say something like this:
{URL}&keep_theme=default

Also, is there a list somewhere of standard/advanced URL structures/parameters that Composr uses? I'm eager to learn them :)

Because you're assume URL has a ? in it. The first parameter has to be preceded with a question mark. Different URL schemes will also use different ways of putting parameters together, so it's risky to make any assumptions.

Composr Tutorial: URL Schemes in Composr - Composr


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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.
Online now: No Back to the top

Post

Posted
Rating:
#5176
Avatar
Site staff
Adam is in the usergroup ‘Super-moderators’
Slightly off-topic from the original post, but I recently changed my URL's to use the logic. However, I cannot seem to get more than one extended param to work.

Code

{$EXTEND_URL,{$CANONICAL_URL},keep_lang={$LANG},_rid=1}

Whichever I place first gets added, be it _rid or keep_lang but it isn't accepting both as per the tutorial example of

Code

{$EXTEND_URL,http://example.com/index.php?foo=a,bar=b}
Online now: No Back to the top

Post

Posted
Rating:
#5177
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Right, that's a bug - docs and implementation does not agree, I'll fix the implementation very soon.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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.
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam)
#5178
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’

KingBast said

Slightly off-topic from the original post, but I recently changed my URL's to use the {$EXTEND_URL} logic. However, I cannot seem to get more than one extended param to work.

Code

{$EXTEND_URL,{$CANONICAL_URL},keep_lang={$LANG},_rid=1}

Whichever I place first gets added, be it _rid or keep_lang but it isn't accepting both as per the tutorial example of

Maybe it's possible that a bug in {$EXTEND_URL} is restricting the symbol from reading any more than 1 parameter.

Here's a possible work-around you could use; I've tested and it seems to work:

Code

{$SET,next_href,{$EXTEND_URL,{$CANONICAL_URL},keep_lang={$LANG}}}
{$EXTEND_URL,{$GET,next_href},_rid=1}

..or you could probably just daisy-chain the {$EXTEND_URL} symbol, like so:

Code

{$EXTEND_URL,{$EXTEND_URL,{$CANONICAL_URL},keep_lang={$LANG}},_rid=1}

Both solutions are the same, but setting a variable makes it easier to read and debug imo.
Online now: No Back to the top

Post

Posted
Rating:
#5180
Avatar
Site staff
Adam is in the usergroup ‘Super-moderators’
Thanks Chris and Joe. Will use the latter bit of code until the update, never thought to do it that way :P
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 1
#5183
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Actually just do:

Code

{$EXTEND_URL,{$CANONICAL_URL},keep_lang={$LANG}&_rid=1}

I've fixed the docs to correspond.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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.
Online now: No Back to the top

Post

Posted
Rating:
#5188
Avatar
Site staff
Adam is in the usergroup ‘Super-moderators’
Out of interest, does {EXTEND_URL} work differently somehow to

Code

{$SELF_URL,0,0,0,keep_lang={$LANG},_rid=1}
which is what I am currently using.
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam)
#5189
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
{$EXTEND_URL,{$SELF_URL,0,0,0},keep_lang={$LANG},_rid=1} and {$SELF_URL,0,0,0,keep_lang={$LANG},_rid=1} would be roughly equivalent.

EXTEND_URL would usually be used with some URL which isn't derived from the current URL.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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.
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Chris Graham)
#5190
Avatar
Site staff
Adam is in the usergroup ‘Super-moderators’
Yeah, I guess the issue with SELF_URL in my case is that it keeps things like redirect=1, so I'm reverting to EXTEND_URL with CANONICAL_URL ;)
Online now: No Back to the top

Post

Posted
Rating:
#5197
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’

Chris Graham said

Joe said

Also, is there a list somewhere of standard/advanced URL structures/parameters that Composr uses? I'm eager to learn them :)

Composr Tutorial: URL Schemes in Composr - Composr


I meant more along the lines of a list of URL parameters that are supported by Composr. For example, a list that includes parameters such as keep_theme=, wide_high= and safe_mode=, or maybe even some for debugging purposes…

Thanks.
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by AdamLiked by Joe)
#5198
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

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 Composr whenever you see the opportunity or support me on Patreon.
  • 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 Composr 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.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

Vaiva, MVLipwig, amit.nigam, gabriel58, Salman, mytracker

Forum statistics:
  • 1,296 topics, 5,829 posts, 7,064 members
  • Our newest member is flour2door
Birthdays:
Back to Top