Loading...
 
Themes

Themes


Need to add server side include... on every page.

Hello,

Pretty new to tiki but I am loving this wiki!

I am using the eatlon theme and want to make one critical modification. I would like to have a random quote right where it says "Our Community, let us learn from one another". I tracked down where this is in the CSS already.

I'm not much of a web designer, or coder, but I put together a nifty perl script that pulls a random line of text from a .txt file and prints it. I have it working by itself.

I then read up on includes, only problem is that you can't do an include in CSS! I started poking around in the PHP but I can't figure it out.

Any ideas? Thanks!

Oops, sorry for the double post redface

Japan

The purpose of CSS is to provide styling or positioning for the site content, not to provide the content itself.

To provide the kind of random content you're talking about, you don't need to go outside of Tiki to some other script, etc. Tiki itself has the functionality already in its "Cookies" feature. Not to be confused with web browser cookies, this feature actually means the "fortune cookie" kind of cookie, i.e., random bits of wisdom displayed one at a time, which you can program with whatever text lines you like.

The admin page for the feature is tiki-admin_cookies.php. The doc page is http://doc.tiki.org/Cookie .

I'm not sure just where you want the text to be displayed. The cookie syntax can be used in any wiki text (wiki, blog post, etc.) or in a module, which can be in any of the module zones. Post again if you need any help in that regard.

-- Gary

Custom theme campaign: Choose any theme at free-css.com(external link), etc. and have it converted for your Tiki site for USD160. Please visit Zukathemes.com(external link) for details.

I should have figured, the more I use this wiki the more I wonder if there is anything it can't do. The trouble is finding all this stuff!

Not that it would have done any good if I found it myself in the menus. I even ran across the cookie thing in a forum post while googling but I discarded it because I thought they were talking about browser cookies! I should have read more carefully.

Ok, so, I have the cookie thing all set up and I have a couple test quotes. When I go to assign the module I get a blank page in Firefox and a page cannot be displayed in IE. I've removed the module and added it back, I've also changed the name. Thanks for the link by the way to the help!

Any thoughts on why it's doing this?

Alternatively is there any other way I can do this? The modules don't see very flexible to me. Though I should attribute that to my lack of knowledge. Seems like adding it in the CSS would make things so much easier for placement. There isn't a way to call this module within the CSS is there?


Japan

I haven't tested the cookies feature in recent Tiki versions, so am just assuming that it works ok. Your experience suggests maybe it doesn't. What version of Tiki are you using?

Again, CSS isn't designed to add content. It's more like the paint on the house. The house has to exist already to receive the paint. Where specifically do you want the text to appear? Then we can pinpoint what Tiki content-displaying feature can address that location.

Well, the modules should be flexible enough. If the location of your text is in the page header area or the side columns or the bottom of the page, then a module can be assigned, to contain the cookie syntax. With the nobox=y parameter, the module's title visual framing is turned off, leaving only the text itself.

-- Gary

I'm on 8.1 right now, though this was deployed using the Microsoft Web Platform Installer. Haven't had any issues with it thus far.

Obviously a little content is delivered through the CSS such as pictures but I get what you are saying. I guess I was looking for a bit of duct tape for this issue :-)

I was wanting to put it right where it says "Our Community, let us learn from one another". Or, on this site for example, where it says "Community, Users, Teams, Blogs & Forums". So to pinpoint it would either be #sitesubtitle or #sitetitle, I might leave #sitetitle for example but put the quote where #sitesubtitle is placement wise. Alternatively I was thinking where the quick admin menu shows up in the top right, either above the quick admin or below it. But yes, it would be in the page header as I know these types of locations are universal throughout pages.

Thanks for your help on this, also I wanted to thank you for adding the Eatlon theme to begin with!


Upcoming Events

No records to display

Menu