MDN

Go Back   Mambo - Forums Closed for posting > Mambo 4.5.5 - Stable > General Questions

Reply
 
Thread Tools Search this Thread Display Modes
Old June 28th, 2004, 11:07   #1
valve
 
valve's Avatar
 
Join Date: May 2004
Posts: 39
valve is on a distinguished road
Default Home page without main body

Would it be possible to design a mambo based site that used two templates where the first was for the home page and the second was primarily a content page.

We would like to have a homepage that was fairly busy with many "latest news" sections for various categories of news, event calendars, and other teasers that would then be expanded when chosen on a second page which used a template geared towards displaying lists of article headers and content (eg articles).

So imagine the first page is really like a modern magazine "contents" page which takes a full page layout with plenty of graphics and feature headlines linking directly to articles, along with areas for different news categories showing the first three or four article headlines under each with a "more..." link

Essentially, we want maximum visual impact on the home page with the content being pushed back to the inside pages.

Can anyone help?

Many thanks,
Vavle

Last edited by valve : June 28th, 2004 at 11:11. Reason: Correct spelling mistakes
valve is offline   Reply With Quote
Old June 28th, 2004, 12:04   #2
tonyskyday
 
tonyskyday's Avatar
 
Join Date: Dec 2003
Location: Charlottesville, VA USA
Posts: 2,836
tonyskyday is on a distinguished road
Default

I believe Stingrey did something similar for his site stingrey.biz.

Basically he made a custom component that just displayed some copies of his display news modules, as I recall. I believe you can achieve the effect you want with a similar technique.

-Tony
__________________
Great Mambo Hosting -- http://www.buyhttp.com
My Site: http://www.tonyscida.com
tonyskyday is offline   Reply With Quote
Old June 29th, 2004, 00:26   #3
stingrey
 
Join Date: Oct 2003
Location: Marikina, Manila, Philippines
Posts: 5,153
stingrey is on a distinguished road
Default

You will need to create a custom frontpage by creating a simple component.

-----------------------------------------------------------

This component will be basically one page that you want to load in the mainbody, with no backend admin support, all you need to do you need is four (maybe even just three) files.

Example:
I will call my component 'home'

1. create a folder called 'com_home'


2. in this folder create four files:
* home.php
* install.home.php
* home.xml
* readme.txt


3. 'home.php' is the php page that will be loaded by mambo. You can do whatver you want in here, just make sure you have, the following code at the top:
PHP Code:
PHP Code:
<?php
  
  defined
'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
 
  
?>[/php
 
 An example of a simple Frontpage, that will load two module positions side by side are:
 [html]
 <?php
 
 defined
'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
 
 
?>
 <div align="center" style="margin-bottom: 5px; font-weight: bold; font-size: 14px;">
 LATEST NEWS
 </div>
 <table width="90%" border="0" cellspacing="10px" align="center">
 <tr valign="top">
     <td width="50%">
     <?php 
     mosLoadModules 
"user1" );
     
?>
     </td>
     <td width="50%" >
     <?php 
     mosLoadModules 
"user2" );
     
?>
     </td>
 </tr>
 </table>
 [/html
 
 
 :arrow: 4. 'install.home.php' (you might not even need this file) use something like this:<?php
 
 
/**
 *
 **************************************************  *****
 * @package Simple Replacement Home page Component For Mambo 4.5
 **************************************************  *****
 **/
 
 
 
function com_install () {
 return 
"Simple Replacement Home page Component installed succesfully<br />";
 }
 
?>
5. 'readme.txt' (you might not even need this file) can be blank, its just a dummy file.


6. 'home.xml' use something like:
HTML Code:
<?xml version="1.0" ?>
  <mosinstall type="component">
  	<name>home</name>
  	<creationDate>02/05/2004</creationDate>
  	<author>Rey Gigataras [stingrey]</author>
  	<copyright>This component is released under the GNU/GPL License</copyright>
  	<authorEmail>mambo@utra.org.au</authorEmail>
  	<authorUrl>mamboforge.net/projects/modmanagerxtd</authorUrl>
  	<version>1.0</version>
  	<description>Home - By Rey Gigataras</description>
  	<files>
  		<filename>home.php</filename>
  	</files>
  	<install>
  	</install>
  	<uninstall>
  	</uninstall>
  	<installfile>install.home.php</installfile>
  	<administration>
  		<menu>Home</menu>
  		<submenu>
  		</submenu>	
  		<files>
  			<filename>readme.txt</filename>
  		</files>
  	</administration>
  </mosinstall>
7. zip you 'com_home' directory - you must make sure that the zip includes the /com_home directory path


8. Upload your new component


9 You will see a reference to your component 'home' in the Admin Menu but there is no page associated with it.


10. You will need to make this the first item (top link) in your main menu so that it will load as your default frontpage.
Simply create a new menu link that is a MOS Component, select @Home, name it whatever you want. Publish it and move it to the top of your Main Menu.


To make life a little easier, here is the Simple Home Component zipped, ready for install:
http://mamboforge.net/frs/?group_id=75&release_id=1000
-----------------------------------------------------------

Now you need to use my Display News family of modues to allow you to display news from specific sections/categories:
http://forum.mamboserver.com/showthread.php?t=9387

It is important you read the documentation to understand how to correctly set the parameters needed by the modules

-----------------------------------------------------------

Now to achieve what you want, you need to create multiple copies of my modules, to allow you to have more than one module:
[ Link modified 22 July ]
http://forum.mamboserver.com/showthr...5178#post65178

-----------------------------------------------------------

Now that you've create multiple copies of my modules and correctly set the parameters, you need to assign them to the user positions you have set for the new frontpage.
In the example I used, positions user1 & user2

To create more module positions:
In administrator/modules.php in function editModule():
PHP Code:
//Look for this:
 
     // hard code options for now
     
$orders2 = array();
     
$orders2['left'] = array();
     
$orders2['right'] = array();
     
$orders2['top'] = array();
     
$orders2['bottom'] = array();
     
$orders2['inset'] = array();
     
$orders2['user1'] = array();
     
$orders2['user2'] = array();
 
 
//Insert this:
 
     // add a new position
     
$orders2['user3'] = array(); 
-----------------------------------------------------------

To show what is achievable, this is a site that uses the method I've discussed:
http://mambo.pickuptruck.com/

My own homepage:
www.stingrey.biz
Uses the same method

-----------------------------------------------------------

Here are examples of several sites that use multiple copies of my Modules to achieve a similar look to what your after:
http://westchester.com/
http://ceaselessagitation.org/
http://www.jolly-jbs.hr/index.php?op...tpage&Itemid=1

-----------------------------------------------------------

That should basically do it.
__________________
All my posts are copyright © Rey Gigataras [aka stingrey] and cannot be be reproduced without permission

Former Mambo Core Team Member July 2004 - August 2005

Last edited by stingrey : July 22nd, 2004 at 07:35.
stingrey is offline   Reply With Quote
Old July 5th, 2004, 12:40   #4
valve
 
valve's Avatar
 
Join Date: May 2004
Posts: 39
valve is on a distinguished road
Default I have hit a problem following your procedure....

Stingrey,

I am extremely grateful for your help on this but I am afraid I have hit a snag that may easily be due to something local to my mambo installation.

I picked up your ready made com_home component and uploaded it. It installed successfully and I went on to create a new menu link for it. This seemed to go okay, as I created the new main menu link for a MOS Component and selected @Home from the drop down list of available components.

However, when I returned to the main menu list, the Home component did not appear. I logged out and logged in again and went back into the main menu list, but still no entry for Home. So I tried to create a new main menu entry again from MOS Components, but this time @Home did not appear in the drop down list, suggesting that Mambo figured it was already in main menu.

Can anyone suggest why Home doesn't appear in the main menu list in admin?

Many thanks,
Valve
valve is offline   Reply With Quote
Old July 5th, 2004, 14:34   #5
valve
 
valve's Avatar
 
Join Date: May 2004
Posts: 39
valve is on a distinguished road
Default Fixed by nefarious means :0)

Found the entry in the database table mos_menu had the home link ordered at 14 while articles was at 1. Swapped these and the Home entry magically appeared at the top of the mos main menu list and the home page in my website nows show the component in the main content section.

Moving on to the next step now to create more user areas for the Home component to display.

Valve
valve is offline   Reply With Quote
Old July 5th, 2004, 22:35   #6
adminjim
 
adminjim's Avatar
 
Join Date: Jan 2004
Location: Keller Point Alaska
Posts: 262
adminjim is on a distinguished road
Default

Why not use a multi template switch in your templates index.php code?
__________________
"An idea is not responsible for those who believe in it"
adminjim is offline   Reply With Quote
Old July 6th, 2004, 09:25   #7
project3e
 
Join Date: Mar 2004
Posts: 50
project3e is on a distinguished road
Red face How?

Quote:
Originally Posted by adminjim
Why not use a multi template switch in your templates index.php code?
I would like to use a multi tempate switch in my index.php, do you have some documentation on it?
project3e is offline   Reply With Quote
Old July 10th, 2004, 17:37   #8
richardt
 
Join Date: Oct 2003
Location: Melbourne, Australia
Posts: 5
richardt is on a distinguished road
Default Determine frontpage and show another template

Hi project3e,

A while ago I posted something in these forums on how to determine whether the user is viewing the frontpage and show another template if they are (in version 4.5). An example is a client's website I designed at: http://www.arrb.com.au.

To achieve this there is only a couple of lines of code to change in the index.php file. Have a look around line 130 for the following: (it's at 132 in the latest beta release)

Code:
$cur_template = $mainframe->getTemplate();
Replace the line with the following code, changing "TEMPLATE_NAME" to whatever you want the frontpage template to be. For the rest of the site Mambo will use whatever template you have published. (I've included the originial line commented out...)

Code:
//$cur_template = $cur_template = $mainframe->getTemplate();
if  ($option =="com_frontpage"){  
$cur_template = "TEMPLATE_NAME"; 
} else { 
$cur_template = $mainframe->getTemplate();
}
Let me know if you need any more help! This is a pretty easy hack but it took me ages to figure it out...
__________________
Richard Thornton - http://brassnthings.net
richardt is offline   Reply With Quote
Old July 22nd, 2004, 07:42   #9
stingrey
 
Join Date: Oct 2003
Location: Marikina, Manila, Philippines
Posts: 5,153
stingrey is on a distinguished road
Default *NEW* component Admin - Copy Module -> Version 1-0

For those wishing to create multiple copies of any module, this is now possible without having to manually edit your database, this new component automates the whole process by making it a point and click affair.

Admin - Copy Module 1-0
http://forum.mamboserver.com/showthr...5178#post65178
__________________
All my posts are copyright © Rey Gigataras [aka stingrey] and cannot be be reproduced without permission

Former Mambo Core Team Member July 2004 - August 2005

Last edited by stingrey : July 22nd, 2004 at 11:25.
stingrey is offline   Reply With Quote
Old August 1st, 2004, 04:47   #10
prj
 
prj's Avatar
 
Join Date: Mar 2004
Location: UK
Posts: 81
prj is on a distinguished road
Default

Quote:
Originally Posted by stingrey
You will need to create a custom frontpage by creating a simple component.

That should basically do it.
I need something that I can use to create a private homepage/page/pages to each user.

This is for services and details including configs and downloads links etc

Only the logged in user should see thier own page.

Is this possible please?
prj is offline   Reply With Quote
Old August 1st, 2004, 04:49   #11
kvoul
 
Join Date: Dec 2003
Location: Greece
Posts: 56
kvoul is on a distinguished road
Question

Quote:
Originally Posted by stingrey
Now that you've create multiple copies of my modules and correctly set the parameters, you need to assign them to the user positions you have set for the new frontpage.
In the example I used, positions user1 & user2
Hello.
Just a question. How can i have the selection @home at the admin module properties (Page(s)? That would be very helpfull
__________________
www.grwest.com
kvoul is offline   Reply With Quote
Old August 5th, 2004, 11:20   #12
Lauren40883
 
Join Date: Jun 2004
Location: Maryland, USA
Posts: 47
Lauren40883 is on a distinguished road
Default help please

Okay I hope Stingrey or somebody can help me out with this. I want my homepage to look much like the first post in this thread describes, with multiple content sections, etc. So, I followed the excellent instructions by Stingrey but its not working.

For example, right now I want to display the latest news from 2 areas: company news and newsletter. I created and installed the "home component", installed Display News-Latest, made 2 additional copies of the module (using the Admin Copy Module Component), and set their positions to user 1 and user 2. Then I set the parameter "set_category_id" to point to the corresponding category in my content section. All of my content items, categories and sections are published but nothing shows up in the module. Anyone know why this is?

I hope this makes sense. I have been trying to figure this out for awhile, but I have no idea why its not working. Searching the forums I found nothing. Did I forget a step? Or are there certain parameters that MUST be set for it to work. I have read through the documentation for the display news module, but it seems to me that there are default settings for most parameters so I dont think this is the problem.

Please help me :-(
Lauren40883 is offline   Reply With Quote
Old August 5th, 2004, 13:21   #13
stingrey
 
Join Date: Oct 2003
Location: Marikina, Manila, Philippines
Posts: 5,153
stingrey is on a distinguished road
Default

If you post the link to your site (or email me, the link if you wish it to remain private) then maybe I can help you figure out the problem.
__________________
All my posts are copyright © Rey Gigataras [aka stingrey] and cannot be be reproduced without permission

Former Mambo Core Team Member July 2004 - August 2005
stingrey is offline   Reply With Quote
Old August 5th, 2004, 15:15   #14
Lauren40883
 
Join Date: Jun 2004
Location: Maryland, USA
Posts: 47
Lauren40883 is on a distinguished road
Default i figured out my mistake

Well I finally figured out what was wrong. In the Mambo Admin backend when you go to Modules -> Manage Modules and then click on the name of the Display News module you want to edit, it brings up the editor with all the options for that module. Well in my "haste" i guess I forgot to select which pages to display the module on. The module wasnt showing up because the setting for which page to show on wasn't set to anything.

I always thought the default setting for this was "All pages" because I know i have not always had to click what pages to put modules on before. And I think the reason why "All Pages" wasnt selected as the default setting is because i used the "Admin Copy Module" component to duplicate the display news module, and it does not automatically set the new duplicated module to appear on all pages.

Yes its a stupid mistake, but I thought i'd post it here anyways, in case some one else comes across the same thing. :-P

Thanks stingrey for replying to my above post.
Lauren40883 is offline   Reply With Quote
Old March 28th, 2005, 18:11   #15
mult1task
 
Join Date: Mar 2005
Posts: 2
mult1task is on a distinguished road
Default Parameters not working

I am trying to edit one of the modules to show the intro text and so they can click on read more however the parameters are not working, this is what I am typing in, in the parameter box...

show_leading = y
show_date = y
show_title = y
show_author = y
show_intro = y
show_readmore = y
show_more_auto = y



Am I doing this wrong? Thanks
mult1task is offline   Reply With Quote
Old April 9th, 2005, 08:33   #16
Bigjohn
 
Join Date: Jul 2004
Posts: 711
Bigjohn is on a distinguished road
Default

Has this all been updated/modified to work with 4.5.2.1?

This looks mighty intrigueing... (boy, can I spell?)
__________________
--Signature Rules: http://forum.mamboserver.com/showthread.php?t=36375
Bigjohn is offline   Reply With Quote
Old May 21st, 2005, 17:07   #17
mistamaila
 
Join Date: May 2005
Posts: 95
mistamaila is on a distinguished road
Default

how can i do the following with displaynews module.

Right now I have to go mark the two latest news in news category and two latest mamblog in mamblog category as "frontpage" in order for it to show up on front page. It has what I need, the "more" selection, to read the rest of it.

How would I, now that I have display news installed and published, have

latest news item
2nd latest news item
latest mamblog item
2nd latest mamblog item

all on the frontpage section?

thanks
mistamaila is offline   Reply With Quote
Old May 23rd, 2005, 15:22   #18
mistamaila
 
Join Date: May 2005
Posts: 95
mistamaila is on a distinguished road
Default

A bunch of the parameters I have been trying do nothing! like use_css = no and show_arrow = no don't stop it from happening. set_count = 2 seems to be the only one that I've gotten working.

Is there some kind of ruleset I have to follow, or something?
mistamaila is offline   Reply With Quote
Old June 3rd, 2005, 08:19   #19
afmaury
 
Join Date: Jun 2005
Posts: 7
afmaury is on a distinguished road
Default mistamalia's problem

Mistamalia- were you ever able to figure out your problem? I am having that same problem and hope to find an answer. Does anyone know?
afmaury is offline   Reply With Quote
Old June 3rd, 2005, 10:54   #20
mistamaila
 
Join Date: May 2005
Posts: 95
mistamaila is on a distinguished road
Default

you mean with displaynews? I kind of put it on the backburner for a while. Maybe you should check out ezine for mambo?

the displaynews guy would never reply to me.
mistamaila is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom home page with links to content. distimica General Questions 1 December 11th, 2005 04:44
How do I put two components on the home page? oneknight General Questions 4 July 22nd, 2005 16:33
Does Admin have a MAIN page ? mcsolas Wishlist & Feature Requests 2 August 7th, 2004 18:54
how do I force the dispay of the front page when 'home' is not in main menu <!--R O B--> General Questions 2 June 23rd, 2004 07:12


All times are GMT -7. The time now is 08:10.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.