2008/1/12 11:38:16
|
---|
|
Need help with ajax "hotlava" themeI'm developing a new theme for icms/xoops that has a lot of neat ajax features, simplicity to use and modify and such, but there are few things that I need help with. I'm going to use this thread for that.
First of all, here's the theme: http://www.pageprogressive.com And here's what I need help with: 1) I want to include a menu file and I am currently doing it this way: <{php}> include ("http://www.pageprogressive.com/themes/hotlava/includes/menu.html"); <{/php}> But this method requires a hard coded link. How can I get the same effect of<{xoAppUrl /themes/hotlava/includes/menu.html}> inside a php snippet, or perhaps there is a better way to include rather than the php snippet. 2) http://webhost.bridgew.edu/etribou/layouts/rMenu/index.html[/d] Managed to figure this out afterall More to come! Edited by drummond on 2008/1/14 7:35:15
Edited by drummond on 2008/1/18 13:11:32 |
_________________
Page Progressive - Print Design, Web Design and Web Hosting |
2008/1/12 12:21:24
|
---|
|
Re: Need help with ajax "hotlava" themeAbout the first question: Have you tried using XOOPS_ROOT_PATH?
I think XOOPS_ROOT_PATH and XOOPS_URL are both available. |
2008/1/12 12:30:37
|
---|
|
Re: Need help with ajax "hotlava" themeAwesome! I knew there was something like that. This worked:
<{php}> include (XOOPS_URL."/themes/hotlava/includes/menu.html"); <{/php}> Thanks so much nachenko! Is there a variable that does the same as <{xoImgUrl includes/menu.html}> ? |
_________________
Page Progressive - Print Design, Web Design and Web Hosting |
2008/1/12 13:24:42
|
---|
|
Re: Need help with ajax "hotlava" themeSmarty also has an include tag <{include file="path/to/file.ext"}>
|
2008/1/12 22:50:26
|
---|
|
Re: Need help with ajax "hotlava" themeagreed^^ you really should utilize the $marty where it is available.
<{include file="$xoops_theme/includes/menu.html"}> no need for <{php}> |
2008/1/14 7:35:54
|
---|
|
Re: Need help with ajax "hotlava" themeAwesome! Thanks!
|
_________________
Page Progressive - Print Design, Web Design and Web Hosting |
2008/1/14 12:14:06
|
---|
|
Hotlava Theme v1Okay, here's version 1 of the Hotlava theme. you can see it in action temporarily here:
http://www.pageprogressive.com/ Note the links there to preview the lightwindow effects and the left block scrolling (Next, previous) and the right according effects block. And download it attached as a zip below. It's not production-ready yet, and I could use some help with some 'to do' items below and with testing if anyone feels so inclined Remember, this theme is not meant to be visually flashy. I intentionally only use one image in the theme because of all the javascript and also for easy theming. This is more of a framework to show the neat things you can do with AJAX, although I am kind of fond of the simple, subtle theming it currently incorporates. FEATURES: ------------------ 1) All-CSS layout 2) Colors (colors.css) and fonts (fonts.css) CSS are stored in seperate files to make it easy to modify without worrying about layout stuff. New colors themes can be adapted from colors.css and used to overwrite the default to get different looks. 3) All Javascript degrades nicely when Javascript is turned off in the browser. 4) Utilities for the theme are designed to be easily overwritten when new versions of the utilities are released. All CSS overriding to them is done in style.css. 5) AJAX/Javascript goodies include: a) Scrolling left blocks with navigation b) Right blocks have "accordian" effect c) All media can be put into a lightwindow effect by simply adding class="lightwindow" to any tag. This includes images, movies, entire image galleries, external websites, local forms and pages. See DEV/LightWindow.txt for more info. d) Notification options are hidden until clicked on to unclutter the layout (like http://community.impresscms.org). e) Font size adjustment options for the user 6) Well documented HTML and CSS. 7) Integration with Mastop Publish's horizontal menu block (simply put it in the top-center block position. In fact, this theme will replace the default menu system with a better one! See DEV/mastop_publush.txt for more details. If no center-top block is present, the include/menu.html file is used instead. 8) Layout adjusts to display properly on non-home pages. Please read the DEV/README.TXT for details. TO-DO: ------------------ 2) Need a way to combine/compress the loading of the CSS/JS. I tried these two methods with no luck. I'm sure I was doing something wrong: http://rakaz.nl/projects/combine/combine.phps http://www.ejeliot.com/blog/72 (currently located in includes folder) 3) Develop a hack for multimenu to use the included Ruthsarian menu instead (like Mastop does). 4) Develop alternate colors.css files to drop in and easily change the look. 5) Add styles for common modules like news, smartsection, forums, etc. 6) Utilize lightwindow pop up windows for icms/xoops forms and utility blocks/pages (IE login, edituser). 8) Correct HTML and CSS validation errors. Edited by drummond on 2008/1/18 13:13:30
|
_________________
Page Progressive - Print Design, Web Design and Web Hosting |
2008/1/14 13:18:12
|
---|
|
Re: Hotlava Theme v1Good Work, I enjoyed it
|
2008/1/14 13:36:36
|
---|
|
Re: Need help with ajax "hotlava" themeReally it looks fine. Good job!
|
2008/1/14 15:38:39
|
---|
|
Re: Need help with ajax "hotlava" themeGreat job! You can bet I'll study how did you do all this stuff and leech it. :D
|
2008/1/14 20:08:48
|
---|
|
Re: Need help with ajax "hotlava" themeIndeed this is a great job and I hope it will be the beginning of a new "theme-history"
|
_________________
in valid code we trust |
2008/1/15 14:27:14
|
---|
|
Re: Need help with ajax "hotlava" themeI've found this resource that used Smarty to compress javascript files and it looks promising, but alas, again I am out of my experience here. Is there anyone out there that this makes sense to that might be willing to give it a try for me?
http://www.thinkvitamin.com/features/webapps/serving-javascript-fast |
_________________
Page Progressive - Print Design, Web Design and Web Hosting |
2008/1/15 17:18:08
|
---|
|
Re: Need help with ajax "hotlava" themeOkay, I think I've somewhat resolved the image path issue with the lightwindow plugin. But here's the problem, I have to hard code "/themes/hotlava/assets/lightwindow/images/ajax-loading.gif" or whatever in lightwindow.js because for some reason using <{xoImgUrl}> translates into %3C%7BxoImgUrl%7D%3E
Anyone know how to escape those characters in JS? I've used those codes before in JS with no problem, so I'm scratching my head. It looks like this in the JS file: overlay : {
opacity : 0.7,
image : '/themes/hotlava/assets/lightwindow/images/black.png',
presetImage : '/themes/hotlava/assets/lightwindow/images/black-70.png'
}, |
_________________
Page Progressive - Print Design, Web Design and Web Hosting |
2008/1/16 1:35:33
|
---|
|
Re: Need help with ajax "hotlava" themeHi again.
I think javascript escapes characters just like php, with \ Check this article: http://www.htmlgoodies.com/beyond/javascript/article.php/3470891 |
2008/1/16 6:14:09
|
---|
|
Re: Need help with ajax "hotlava" themeThanks again nachenko,
I actually tried that ( \ ) method for escaping the < and { characters but no luck ;-( I still get %3C%7B$xoops_imageurl%7D%3E rather than <{$xoops_imageurl}> loading : '<div id="lightwindow_loading" >'+
'<img src="/themes/hotlava/assets/lightwindow/images/ajax-loading.gif" alt="loading" />'+
'<span>Loading or <a href="(script removed) myLightWindow.deactivate();">Cancel</a></span>'+
'<iframe name="lightwindow_loading_shim" id="lightwindow_loading_shim" src="(script removed)false;" frameBorder="0" scrolling="no"></iframe>'+
'</div>', |
_________________
Page Progressive - Print Design, Web Design and Web Hosting |
2008/1/16 6:25:21
|
---|
|
Re: Need help with ajax "hotlava" themeSeems that the code is being sanitized by Smarty. No idea how to override this behavior.
|
2008/1/18 12:45:56
|
---|
|
Re: Need help with ajax "hotlava" themeThanks to marcan, we have a solution:
Put this in theme.html to make <{xoImgUrl}> variable available to javascripts as xoops_theme_url: <!-- Make theme url available javascripts -->
<script type="text/javascript">
var xoops_theme_url = "<{xoImgUrl}>";
</script> So now, in this lightwindow.js file I can do: image : xoops_theme_url + '/assets/lightwindow/images/black.png', |
_________________
Page Progressive - Print Design, Web Design and Web Hosting |
2008/1/18 17:35:26
|
---|
|
Re: Need help with ajax "hotlava" themeOkay, what am I doing wrong here?
<a href="<{xoAppUrl /modules/system/admin.php?fct=blocksadmin&op=edit&bid=<{$block.id}>}>" title="Edit this Block"> Apparently you can't use smarty variables inside of smarty variables. Would would the right syntax be for <{$block.id}> ? |
_________________
Page Progressive - Print Design, Web Design and Web Hosting |
2008/1/18 17:45:16
|
---|
|
Re: Need help with ajax "hotlava" themeYes, you can't use smarty inside other smarty like you trying use.
You can use this:
<a href="<{xoAppUrl /modules/system/admin.php?fct=blocksadmin&op=edit&bid=}><{$block.id}>" title="Edit this Block">
or this:
<a href="<{xoAppUrl}>modules/system/admin.php?fct=blocksadmin&op=edit&bid=<{$block.id}>" title="Edit this Block">
In both cases you get the desired result. I hope that was useful. |
2008/1/19 11:29:05
|
---|
|
Re: Need help with ajax "hotlava" themeThanks TheRplima, I realized it was a dumb question right after I posted it, but it's good to know that second method
|
_________________
Page Progressive - Print Design, Web Design and Web Hosting |