Support Forums

Extended - A free template for v4

This is a discussion on Extended - A free template for v4 within the Technical Support forums, part of the Technical Support Forums category; I've modified this from a free css template. It seems to be working very well but I offer no guarantees ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 09-24-2007, 05:50 PM   #1
Just get on with it!
 
 
Join Date: Jan 2007
Location: Milton Keynes, England
Posts: 487
Rep Power: 34
michael is just really nice michael is just really nice
Default Extended - A free template for v4

I've modified this from a free css template. It seems to be working very well but I offer no guarantees or support, if anyone finds it useful you are most welcome to use it.

I've simply zipped up the whole template folder as I'm using it so you'll have to change all the links and references to my site otherwise you're good to go.

Good Luck

~ 15th April 2008 ~ I have updated the template to include automatic generation of Main Category links in the Categories menu.
Attached Files
File Type: zip extended.zip (118.2 KB, 30 views)
__________________
M Michael
V4.2.3 Developer - Sigma Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)

Last edited by michael; 04-15-2008 at 04:27 PM. Reason: Updates files.
michael is offline  
Old 09-26-2007, 12:33 PM   #2
Junior Member
 
Join Date: Sep 2007
Posts: 23
Rep Power: 17
castus is on a distinguished road
Default

I see you have hardcoded all of your category links in your template. Is there no way to automate this list from the DB? Using the cats and sub cats?
castus is offline  
Old 09-26-2007, 12:58 PM   #3
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 135
Eric Barnes is just really nice Eric Barnes is just really nice
Default

You should be able to use this:

Code:
{categories_parent}
                        {foreach from=$pcat item=entry}
                            <li>{$entry.link}</li>
                        {/foreach}
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 09-27-2007, 09:32 AM   #4
Junior Member
 
Join Date: Sep 2007
Posts: 23
Rep Power: 17
castus is on a distinguished road
Default

Hi Eric,

Thanks for the reply. It doesn't quite work, because it puts in the following link:

Code:
category.php?type=14
Rather than

Code:
category.php?cat=cat_name
Also, it is possible to get the sub categories to show as an extra list like this:

<ul>
<li><a>link etc</a></li>
<li>
<ul>
<li><a>link etc</a></li>
</ul>
</li>
</ul>

etc
castus is offline  
Old 09-27-2007, 12:19 PM   #5
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 135
Eric Barnes is just really nice Eric Barnes is just really nice
Default

No this one only gets the parent categories.

Here is a new file to change the category link:
PHP Code:
<?php
/**********************************
* 68 Classifieds
* http://www.68classifieds.com/
*
* All source code & content (c) Copyright 2007, 68 Classifieds
* unless specifically noted otherwise.
***********************************/

/**
 * This function is useful for using your parent categories in the navigation
 * 
 * To Call this function in your template you would use: 
 * <code>{categories_parent}
 * {foreach from=$pcat item=entry}
 * {$entry.link}
 * {/foreach}</code>
 * 
 */
function smarty_function_categories_parent($params, &$smarty)
{
    global 
$db$class_tpl;
    
        
$sSQL "SELECT id,name,cLink,slug FROM ".PREFIX."categories WHERE parent_id = 0 AND display<>'N' ORDER BY cORDER DESC, name ASC";
        
$result=$db->query($sSQL);
        
$i=0;
        while(
$rs=$result->fetch())
        {
            if(
$arow['cLink']<>"")
            {
                
$rs['link']='<a href="'.$rs['cLink'].'">'.$rs['name'].'</a>';
            }
            else
            {
                
$rs['link']='<a href="category.php?cat='.$rs['slug'].'">'.$rs['name'].'</a>';
            }
            
$cat[]=$rs;
        }
    
$class_tpl->assign('pcat'$cat);
}
?>
Upload it to: includes/classes/smarty/plugins/function.categories_parent.php
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 09-27-2007, 12:30 PM   #6
Junior Member
 
Join Date: Sep 2007
Posts: 23
Rep Power: 17
castus is on a distinguished road
Default

Ahhh ok. I think i'm getting it more now. I think from that I'll beable to put another query in to get the subcats.

On another note - is the SEF URL add on available yet for v4? Or will v3 work fine on it?

thanks
castus is offline  
Old 09-27-2007, 12:53 PM   #7
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 135
Eric Barnes is just really nice Eric Barnes is just really nice
Default

I believe it is available now and you can download it from our customer area. It is a little different than v3 because of the new category links.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 09-27-2007, 12:55 PM   #8
Junior Member
 
Join Date: Sep 2007
Posts: 23
Rep Power: 17
castus is on a distinguished road
Default

ok - thanks for the info.
castus is offline  
Old 09-27-2007, 02:41 PM   #9
Just get on with it!
 
 
Join Date: Jan 2007
Location: Milton Keynes, England
Posts: 487
Rep Power: 34
michael is just really nice michael is just really nice
Default

Just to remind everyone that this template has not been produced by Eric neither is it endorsed by 68Classifieds. Eric's a good guy but he is under no obligation to assist anyone with this template.

That being said, I'd like to say "Thanks" to you Eric for jumping in when you've surely got enough of your own work to deal with.

__________________
M Michael
V4.2.3 Developer - Sigma Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
michael is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Template? FlyingBee Templates, HTML, CSS, and Design Help 4 12-08-2006 10:17 AM
Where's my free template? detrate Pre Sales Questions 3 08-07-2006 08:50 AM


All times are GMT -4. The time now is 12:10 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0