e107 icon indicating copy to clipboard operation
e107 copied to clipboard

theme visibility filter problem with $

Open Jimmi08 opened this issue 6 years ago • 10 comments

On first look everything looked correct image But I couldn't get it to work.

if I do this var_dump($kpage); print_a($kpage); result is: image

so I checked the database and there is value

image

so of course this test fails

          var_dump($lastChar); print_a($lastChar);  
					if($lastChar === '$') // script name match.
					{  

image

If I check Database Tools/Prefs Editor, it displays image

Maybe it's environment issue (xampp), no idea, but that check should count with both version of $.

Jimmi08 avatar Jul 30 '19 09:07 Jimmi08

Adding this line helped: $kpage = html_entity_decode($kpage, ENT_NOQUOTES, 'UTF-8');

Jimmi08 avatar Jul 30 '19 09:07 Jimmi08

Confirmed

Moc avatar Aug 08 '19 12:08 Moc

@Jimmi08 Please re-test and open again if necessary. Thank you.

CaMer0n avatar Aug 22 '19 21:08 CaMer0n

As of v2.3.1 one can now use :(e_ROUTE) for theme layout switching in the Theme Manager.

eg. :news/list/item

image

In the browser, add ?[debug=paths!] to the SEF URL to find the value of e_ROUTE for that particular page listed in the footer. (must be logged in as admin)

image

It also accepts partial matches.

eg. You could enter :vstore for all SEF urls of the vstore plugin, or :news/list to match all news/list/ routes such as:

  • news/list/all
  • news/list/short
  • news/list/category
  • news/list/day
  • news/list/month
  • news/list/tag
  • news/list/author

Unlike matching the SEF URL itself, the value of e_ROUTE will not change when a SEF alias is used.

eg. If the admin renamed their /vstore SEF URL alias for the "products" page to /myshop in Admin > Url Configuration > Configurations like below, the e_ROUTE value would still be vstore/product

image

I also plan to add a pop-up for when we type ':' for a list of available routes. (it may go into this release or a future one)

@Moc @realmontazeri (for user and dev documentation)

@Jimmi08 @fizi fyi.

CaMer0n avatar Feb 14 '21 19:02 CaMer0n

Popup route menu example:

image

@Moc @Jimmi08 @fizi @realmontazeri

CaMer0n avatar Feb 17 '21 22:02 CaMer0n

TODO

  • [ ] Remove delay while typing after ':'
  • [ ] Fix the value reverting to "_blank/" when pressing ENTER.
  • [ ] Added e_ROUTE value while SEF is turned off for all core plugins.

CaMer0n avatar Feb 21 '21 20:02 CaMer0n

@CaMer0n

Standalone page (without chapter) has with SEF_URL e_ROUTE page/book/index

I don't think it is correct, is it?

Jimmi08 avatar Feb 22 '21 20:02 Jimmi08

@Jimmi08 You're right, that is incorrect. It should be page/view/other

CaMer0n avatar Feb 22 '21 20:02 CaMer0n

@CaMer0n when I use :news/view/item , it works if I use just :news it stopped to work

Screen just to be sure (no mistypo) image

Jimmi08 avatar Feb 26 '21 16:02 Jimmi08

@CaMer0n maybe just question

If Frontpage is set to custom URL, that is a page in my case, what should be e_ROUTE?

  • you can't use the custom page option for Frontpage, because then only the content of that page is used, so you do this:

image

It works, only "FRONTPAGE" fails in detecting layout.

e_ROUTE is page/book/index which looks weird.

This was fix: image

Thanks

Jimmi08 avatar Mar 15 '21 08:03 Jimmi08