PDA

View Full Version : Hide Child/Parent Style Relationship in Style Quick Chooser?


RedTurtle
08-11-2012, 07:30 PM
On my forum I have a few styles that are child styles of others. Is there a way to make it so that the parent/child hierarchy doesn't show up in the quick style chooser? I want all styles to show up flat without any hierarchy at all.

Currently:

-Default
---Default Red
---Default Green
-Widescreen
---Widescreen Green


What I'd like:

-Default
-Default Red
-Default Green
-Widescreen
-Widescreen Green


Thank you! :)

kh99
08-12-2012, 01:11 PM
You could try creating a plugin using hook parse_templates and code like this, :


$quickchooserbits1 = preg_replace('/--(-*)/', '--', $quickchooserbits1);
$quickchooserbits2 = preg_replace('/--(-*)/', '--', $quickchooserbits2);



But this won't change the list of styles that the user sees when they choose a default in the profile (and it might not work for mobile devices). To change it everywhere, you would need to modify the code.

RedTurtle
08-12-2012, 06:10 PM
You could try creating a plugin using hook parse_templates and code like this, :


$quickchooserbits1 = preg_replace('/--(-*)/', '--', $quickchooserbits1);
$quickchooserbits2 = preg_replace('/--(-*)/', '--', $quickchooserbits2);



But this won't change the list of styles that the user sees when they choose a default in the profile (and it might not work for mobile devices). To change it everywhere, you would need to modify the code.

Exactly what I needed! :D

Thank you!