Just an idea
Would it be possible for the devs to include a slave include in the head section of the templates.
Like <? php include ('/home/mysite/public_html/forum/themes/slave.php')?>
This wouls save a ton of hassle for myself and noobs to add additional css js files.
The path could be configured in dashboard.
There was an error rendering this rich post.
Best Answer
-
x00 MVP
there are already server header plugins.
Have a look at the WebHed plugin it show the basic principle. It implements
Gdn_IPlugin
so it is not needed to be enabled.I uses
$Sender->Head->AddTag
, but you can also use$Sender->AddJsFile
,$Sender->AddCssFile
,$Sender->Head->AddScript
,$Sender->Head->AddString
, etcStuff like you are suggesting really weaken frameworks makes them less robust. You be surprised how many themes break functionality in wordpress, even popular theming frameworks, event not reached an so on.
grep is your friend.
1
Answers
+1 for the idea
There was an error rendering this rich post.
Hmm not sure I like this idea. Theme hooks, are better, idea. Or copying the default master over. The whole point is to yield to the template rather then have header and footer files.
You have the pocket plugin.
You can already add a custom.js, and custom.css to your theme too.
grep is your friend.
Reason i ask,
1 speed.
2 users could disable the include with one click, and compartmentalise all custom stuff in the include.
Yesterday a user was adding css and js for third party stuff, i helped him out but fark was it over complicated.
Yep pockets is great, but im betting most users havent a clue where the exact code is plonked.
However, i should recheck pockets plugin, just from a theme pov an include is so much faster
There was an error rendering this rich post.
Why don't you create your own include? I mean you can put it in the default master.
grep is your friend.
Of course i can, but i cant in other peoples sites lol.
Be cool, to just tell them to goto includes/slave.php and paste this code in
There was an error rendering this rich post.
You could write a 10minute plugin that does exactly what you are asking for. That way you can enable ordisable through the dashboard. Just put the includes in a folder in the plugin directory.... better yet you could allow them to just drop js files in a plugins/myincludes/js directory and then have the plugin enumerate the files in the directory and add them all.
I bet x00 would make that for you for a few bucks.... im too lazy to do it.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
there are already server header plugins.
Have a look at the WebHed plugin it show the basic principle. It implements
Gdn_IPlugin
so it is not needed to be enabled.I uses
$Sender->Head->AddTag
, but you can also use$Sender->AddJsFile
,$Sender->AddCssFile
,$Sender->Head->AddScript
,$Sender->Head->AddString
, etcStuff like you are suggesting really weaken frameworks makes them less robust. You be surprised how many themes break functionality in wordpress, even popular theming frameworks, event not reached an so on.
grep is your friend.