![]() |
Better "Preview" for templates in the CP
This is a very quick hack that enhaces the "Preview" feature in the Template Editor. Currently I find the preview to be useless, I can also see funky colors and odd tables.
With this hack, you will get a slightly better idea of how the template will really look like, because all the {replacement} variables will be replaced with their real value. If you have Mutt's "Advanced Template Editor" hack installed, please follow the directions in this post: https://vborg.vbsupport.ru/showthrea...&postid=253878 Thanks Mutt! In template.php replace: PHP Code:
PHP Code:
Code:
$replacementsetid = 1; ### Change me to use a different replacement set! |
And here is a screen shot for the imagination challenged...
|
Here's how it looks currently, without the hack. Ugly right?
|
Until now I'd never even realised that this 'Preview' feature was there, I must be a little short sighted! Nice work FireFly! Running on 2.2.5 well. :D
|
very nice addition and works perfectly here..
|
BTW, there is a small bug when you Preview empty templates. The Javascript function I added (found it by Google ;)) doesn't support empty strings, so the page will just hang. Then again you shouldn't have any empty templates, and if you had you wouldn't want to preview them, so...
|
Very Nice, works great for me.
|
nice hack, I'll have to install it when I get home ;)
|
omg u read my mind firefly... i was going to request this 2nite... how about being able to allow images in the preview??
also my replacement set doesn't seem to be working on the previews...??? any ideas?? Thanks In Advance |
Just a word of caution...if your using Mutt's Template Editor this will not work correctly....
|
All times are GMT. The time now is 03:51 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|