Post by hm2k » Wed Mar 12, 2008 12:42 pm

Effectively the information on the home page, the welcome or introduction text ($text_greeting) should be adjustable via the admin area, thus database driven.

There's no way i'd want end users messing with files to change the text.

On my setup at the moment I have the introduction text in an "information page", it would be nice if I could simply/easily include that into the home page.

I may work on this idea if there's no other solutions out there...
Last edited by hm2k on Wed May 14, 2008 11:16 pm, edited 1 time in total.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by Telefax » Sat May 10, 2008 2:06 am

Neat... might I ask on how you the easy way do this i.e.

What files do I go into and make changes (and what changes) to have a "information page" as startpage like you have it?

Would help alot if you posted how you did it :D

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by Luvz2drv » Sat May 10, 2008 4:25 am

There is away...    take a look at http://hosting-whse.com/projects/Site11
its a sandbox  but it shows the idea of what you want...  just as a fyi - also working on a small blog type addon as well

Global Moderator

Posts

Joined
Fri Mar 21, 2008 10:58 am

Post by Telefax » Sat May 10, 2008 6:18 am

Very romantic and neat GUI... Great job... I bet that addon will not be free, aye? all good things cost!

So... is there any "visual/text" way you might share the basics on how to change the "home" (startpage) into an alternate like "controller=information&information_id=100" - that would be son nice to have it work that was as I hate non-easy-to-administrate pages :(

Also, as you are an expert, is there any easy "hack" to change the terrible inbuilt-popup to a normal javascript popup that scales after the image. I have images 1000x1000 and when they scale down its NO good :) All i wanted was to replace the in-build junk image script with a NORMAL javascript popup, but alas I dont know how to do it....

You are the expert, not me.... hehe

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by hm2k » Wed May 14, 2008 11:34 pm

I found this fairly difficult to achieve without a major hack, this is my resulting mod:

OPEN "/catalog/controller/home.php"

FIND $template->set('content', $view->fetch('content/home.tpl'));

ABOVE ADD:

Code: Select all

		//text_greeting from information mod START
	
		$ _GET['information_id']=13;//set this to whatever page you wish to pull
		$request  =& $this->locator->get('request');
		$information_info = $database->getRow("select * from information i left join information_description id on (i.information_id = id.information_id) where i.information_id = '" . (int)$request->get('information_id') . "' and id.language_id = '" . (int)$language->getId() . "'");
		if ($information_info) { $view->set('text_greeting', $information_info['description']); }
		//text_greeting from information mod END
Please Note: There is a space between $ and _GET, I was forced to place it there by this forum, there should be no space.

If anyone has a better suggestion on how to achieve this, I'm all ears...

Perhaps forget information pages all together, and simply add a field in the configuration that would give you a place to enter a text_greeting (remember must be HTML).
Last edited by hm2k on Wed May 14, 2008 11:39 pm, edited 1 time in total.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK
Who is online

Users browsing this forum: No registered users and 3 guests