PDA

View Full Version : Featured Links on ALL pages


shelly
02-12-2007, 03:55 PM
Hi

I am using Greenleaves Template with 2.0.2

and at the moment the featured Links box and links show on the right hand side

It is there on the home page and if I click on a category it is there - but that is it - it does not show on any other pages - sub cats,link details,suggest link,about us etc etc

Is there a way to make it show on ALL pages??

Many thanks

Sergey Ten
02-12-2007, 08:01 PM
Hello shelly!

Can you send me via PM your FTP details?

shelly
02-12-2007, 08:07 PM
Why?

I do not have a problem?

I am enquiring HOW to do something??

Sergey Ten
02-12-2007, 08:54 PM
shelly,

Ok, I have fixed it on my local server, and it is solution:

[ Open your index.php ]
[ Find code ]


/** get featured links **/
if ($gDirConfig['featured_links'])
{
$featured_links =& $gDirDb->getFeaturedLinks($category['id'], 0, $gDirConfig['num_featured_display']);
$gDirSmarty->assign_by_ref('featured_links', $featured_links);
}


[ Remove or comment it ]
[ Save change ]


[ Open your header.php ]
[ Find code ]


/** get menus to display **/
$menus =& $gDirDb->getPageMenus();
$gDirSmarty->assign_by_ref('menus', $menus);


[ After add that code ]


/** get featured links **/
if ($gDirConfig['featured_links'])
{
$featured_links =& $gDirDb->getFeaturedLinks($category['id'], 0, $gDirConfig['num_featured_display']);
$gDirSmarty->assign_by_ref('featured_links', $featured_links);
}


[ Save change ]

shelly
02-12-2007, 09:07 PM
Sergey

That did the job

Many many thanks:dance2:

Sergey Ten
02-12-2007, 09:33 PM
You are welcome shelly :)

shelly
02-28-2007, 04:07 PM
Hi Sergey

could you supply the code for the same function using 2.1.01 please

Many thanks

Dave Baker
03-01-2007, 05:51 PM
Hi shelly,
Please try it:
***Open header.php and find code (right on the bottom of the file)***

$config->set('lang',$l);
define("LANGUAGE", $l);
unset($l);

***Below add***

$id = (int)$_GET['category'];
// Smarty and other View related things
include(INCLUDES.'view.inc.php');

***Save file***
***Open file index.tpl and find code(around line # 95)***

// Smarty and other View related things
include(INCLUDES.'view.inc.php');
global $gDirSmarty;

***Replace with***

// Smarty and other View related things
//include(INCLUDES.'view.inc.php');
global $gDirSmarty;

***Save file***

shelly
03-02-2007, 04:59 PM
Hi Dave

That worked:good:

but it was index.php not index.tpl:)

Many thanks

shelly
03-02-2007, 05:28 PM
Sorry Dave

I spoke too soon

NOW - news and contact us pages show as blank pages??

Any advice please?

Many thanks

Greg
03-02-2007, 06:59 PM
Sorry Dave

I spoke too soon

NOW - news and contact us pages show as blank pages??

Any advice please?

Many thanks

Shelly give this a try.

Open news.php and contacts.php
find and remove this line: (backup for safety)
include(INCLUDES.'view.inc.php');

May help?

shelly
03-02-2007, 10:23 PM
Thanks Greg

that worked perfectly:good:

Greg
03-03-2007, 02:33 AM
Thanks Greg

that worked perfectly:good:

You're Welcome shelly :)

@ rlall2 You'll have to wait until either Dave or Sergey see this.
As you're using version 1.2 I hope you've applied the patch for it.

http://www.esyndicat.com/forum/showthread.php?t=7296&highlight=1.2+patch

shelly
03-03-2007, 03:49 PM
Hi Greg

Now I notice that I can not suggest a link - I get the message that the category is locked? and it is not!

the code for the header you gave me was this:

$id = (int)$_GET['category'];
// Smarty and other View related things
include(INCLUDES.'view.inc.php');

So I tried altering it to this:

// Smarty and other View related things
include(INCLUDES.'view.inc.php');

and it works ok:)

but can you forsee any problems with this??

everything seems to be ok!

Many thanks

P.S.. I notice that I am called a 'Graduate' Now:dance:

Greg
03-03-2007, 04:53 PM
I really don't know shelly? Dave Baker is the one who gave that code. I think he could answer that for you.

P.S.. I notice that I am called a 'Graduate' Now
Congrats :)

Dave Baker
03-05-2007, 05:12 PM
Hello Shelly,
It seems you have a locked category. Probably there was an incorrect processing id category. Please inform me which categories was locked and I will test it.

rlall2
03-11-2007, 06:57 AM
Hi shelly,
Please try it:
***Open header.php and find code (right on the bottom of the file)***

$config->set('lang',$l);
define("LANGUAGE", $l);
unset($l);

***Below add***

$id = (int)$_GET['category'];
// Smarty and other View related things
include(INCLUDES.'view.inc.php');

***Save file***
***Open file index.tpl and find code(around line # 95)***

// Smarty and other View related things
include(INCLUDES.'view.inc.php');
global $gDirSmarty;

***Replace with***

// Smarty and other View related things
//include(INCLUDES.'view.inc.php');
global $gDirSmarty;

***Save file***
Hi Dave,

I am using Greenleaves Template 2.1.01

Is there a way to get the PARTNER links to show on all pages (e.g., sub cats,link details,suggest link,about us, etc).

Thanks

Sergey Ten
03-11-2007, 07:26 AM
Hello rlall2,

Try to do the following:

[ Open your header.php ]
[ Find code ]


$config->set('lang',$l);
define("LANGUAGE", $l);
unset($l);


[ After add code ]


loadClass("DirLink");
$Link = & new Link();


// Smarty and other View related things
include(INCLUDES.'view.inc.php');
global $gDirSmarty;

$partner_links = $Link->getPartner(0, 0, 5);
$gDirSmarty->assign_by_ref('partner_links', $partner_links);


[ Save change ]


[ Open your index.php ]
[ Find code ]


// Smarty and other View related things
include(INCLUDES.'view.inc.php');
global $gDirSmarty;


[ Remove or comment it ]
[ Save change ]

rlall2
03-11-2007, 06:09 PM
Hello rlall2,

Try to do the following:

[ Open your header.php ]
[ Find code ]


$config->set('lang',$l);
define("LANGUAGE", $l);
unset($l);


[ After add code ]


loadClass("DirLink");
$Link = & new Link();


// Smarty and other View related things
include(INCLUDES.'view.inc.php');
global $gDirSmarty;

$partner_links = $Link->getPartner(0, 0, 5);
$gDirSmarty->assign_by_ref('partner_links', $partner_links);


[ Save change ]


[ Open your index.php ]
[ Find code ]


// Smarty and other View related things
include(INCLUDES.'view.inc.php');
global $gDirSmarty;


[ Remove or comment it ]
[ Save change ]

Hi Sergey,

The above code for PARTNER LISTINGS worked on some pages and not others.

CODE WORKED CORRECTLY ON SUBCATEGORIES: (example: http://www.findinlandempirebusiness.info/personal-care/)

CODE DID NOT WORK ON:
1. Does not appear in the sub-subcategory pages (example: http://www.findinlandempirebusiness.info/real-estate2/residential-real-estate/)

2. Or link details page (example: http://www.findinlandempirebusiness.info/real-estate2/residential-real-estate/Riverside-Condos-l497.html)

Could you let me know what modifications are needed so that PARTNER LINKS appear on every page?

Thanks for your help.