View Full Version : Suggest Link in
shelly
02-06-2007, 03:07 PM
Hi Does anyone know how to do this?
on this site I found http://add-link-directory.agency-modeling-look.com/
when you visit the homepage - 'Suggest Link' and 'Suggest Category' does not show in the Menu Bar until you click on a Category.
and when you then Suggest a link in one of the main categories you are then prompted to
'Please browse to a more specific category to add your url.'
thus forcing you to suggest a link in a sub category - this is exactly what I want to achieve.
Is there a way to do this please using Pro v2.0.2 ??
Many thanks
Sergey Ten
02-06-2007, 04:26 PM
Hello shelly!
May be you use PRO 1.2? In any case send me your FTP and CPanel details via PM and I will check up your problem. Thanks.
shelly
02-06-2007, 04:39 PM
Sorry Sergey
Maybe you misunderstand
I have no problem
It is something I want to do using 2.0.2
Like what has been done on the site I gave a link to
Sergey Ten
02-06-2007, 04:54 PM
shelly,
I am sorry :) Yes, of course you can upgrade your version to PRO 2.0. Please read the instructions:
http://www.esyndicat.com/forum/about7611.html
shelly
02-06-2007, 05:13 PM
No No Sergey
I think we are talking at cross purposes here.
I have version 2.0.2 already
Like the site I mentioned I want to
Not show 'suggest link' and 'suggest category' on the main page
I want it to show in the menu bar only when the user clicks on a category
then
I then want - when a user tries to suggest a link to a main category they get a message 'Please browse to a more specific category to add your url.'
so that they have to go back and pick a sub category to suggest a link in
please take a look at http://add-link-directory.agency-modeling-look.com/
Sergey Ten
02-06-2007, 06:37 PM
shelly,
Just send me FTP details and I will try to help you. (via PM)
shelly
02-06-2007, 08:00 PM
Thanks for the offer but
I need to know how to implement this myself as I have 12 sites to do it on
many thanks anyway
Sergey Ten
02-06-2007, 08:47 PM
Hello shelly!
Ok, try this:
Admin panel >> configuration >> General Configuration >> Categories dropdown instead of tree : disable
shelly
02-06-2007, 10:17 PM
Hi
I found a post about locking Categories which answers most of my question
Just one last thing now is - how can I not show 'Suggest Link' and Suggest Category' on the home page.
But I do want these links to show in menu bar only after someone has clicked on a category'
I am using Greenleaves template
Sergey Ten
02-06-2007, 11:06 PM
Hello shelly!
Please post URL your site.
shelly
02-06-2007, 11:15 PM
If you look at this site http://add-link-directory.agency-modeling-look.com/
you will notice that 'Suggest Link' and 'Suggest Category' does not show in the top menu on the home page.
Now click on a category and you will notice that 'Suggest Link' and 'Suggest Category' now show in the top menu.
This is what I want to achieve on my site using Greenleaves Template with version 2.0.2
Sergey Ten
02-06-2007, 11:52 PM
shelly,
You want it for PRO 2.0! ok, just follow the directives:
[ Open your templates/your_template/Layout.php ]
[ Find code in the function "print_menu" ]
$menu['suggest-link']['caption'] = $gDirLang['suggest_link'];
$menu['suggest-link']['url'] = $url."suggest-link.php?id={$aCategory}";
if ($gDirConfig['suggest_category'])
{
$menu['suggest-category']['caption'] = $gDirLang['suggest_category'];
$menu['suggest-category']['url'] = "{$url}suggest-category.php?id={$aCategory}";
}
[ Replace with ]
if(0 != $aCategory)
{
$menu['suggest-link']['caption'] = $gDirLang['suggest_link'];
$menu['suggest-link']['url'] = $url."suggest-link.php?id={$aCategory}";
}
if ((0 != $aCategory) AND ($gDirConfig['suggest_category']))
{
$menu['suggest-category']['caption'] = $gDirLang['suggest_category'];
$menu['suggest-category']['url'] = "{$url}suggest-category.php?id={$aCategory}";
}
[ Save change ]
shelly
02-07-2007, 12:47 AM
That is brilliant - just what I wanted:yahoo:
Thank you for your time
and being patient with me
shelly
02-09-2007, 05:24 PM
Hi Sorry me again:poka:
I now have pro2.1 installed and the code you provided for 2.0.2 does not work with this.
'Suggest link' and 'suggest category' do not show on home page which is fine cos that is what I want but now when I click on a category only *suggest link' shows in the top menu instead of both links
many thanks
Hi Sorry me again:poka:
I now have pro2.1 installed and the code you provided for 2.0.2 does not work with this.
'Suggest link' and 'suggest category' do not show on home page which is fine cos that is what I want but now when I click on a category only *suggest link' shows in the top menu instead of both links
many thanks
Hi shelly
Double check that you have "Allow Suggest Category" enabled
Admin Panel » Configuration » General Configuration
Way down at the bottom:
Allow Suggest Category enabled disabled
click enabled
Save Changes
shelly
02-09-2007, 07:22 PM
Yes 'Suggest Category' is already enabled
Like I say the code in 2.1 - Greenleaves template - Layout.php appears to be different to 2.0.2
any other suggestions please??
Dave Baker
02-09-2007, 08:36 PM
***Find the following code in function "print_menu" (file templates/yourTemplate/Layout.php)***
$menu['suggest-link']['caption'] = $gDirLang['suggest_link'];
$menu['suggest-link']['url'] = $url."suggest-link.php?id=".$aCategory;
if ($config->get('suggest_category'))
{
$menu['suggest-category']['caption'] = $gDirLang['suggest_category'];
$menu['suggest-category']['url'] = $url."suggest-category.php?id=".$aCategory;
}
***Replace with***
if ($aCategory > 0)
{
$menu['suggest-link']['caption'] = $gDirLang['suggest_link'];
$menu['suggest-link']['url'] = $url."suggest-link.php?id=".$aCategory;
if ($config->get('suggest_category'))
{
$menu['suggest-category']['caption'] = $gDirLang['suggest_category'];
$menu['suggest-category']['url'] = $url."suggest-category.php?id=".$aCategory;
}
}
***Save file***
shelly
02-09-2007, 09:15 PM
Thanks Dave
Nearly there.
I have some locked categories and in 2.0.2 with this mod the user was still able to suggest a category to the locked category but not suggest a link to it - which is fine cos this is what I want,
However now with this mod for 2.1 you have supplied - the user can not suggest a category to the locked category they get the 'error category locked message' but are still able to try and add a category - which fails.
Is there any way to make it work in 2.1 as it did in 2.02 with this mod - that they can suggest a category to a locked category?
Many thanks for your help and time
shelly
02-10-2007, 01:49 PM
***Find the following code in function "print_menu" (file templates/yourTemplate/Layout.php)***
$menu['suggest-link']['caption'] = $gDirLang['suggest_link'];
$menu['suggest-link']['url'] = $url."suggest-link.php?id=".$aCategory;
if ($config->get('suggest_category'))
{
$menu['suggest-category']['caption'] = $gDirLang['suggest_category'];
$menu['suggest-category']['url'] = $url."suggest-category.php?id=".$aCategory;
}
***Replace with***
if ($aCategory > 0)
{
$menu['suggest-link']['caption'] = $gDirLang['suggest_link'];
$menu['suggest-link']['url'] = $url."suggest-link.php?id=".$aCategory;
if ($config->get('suggest_category'))
{
$menu['suggest-category']['caption'] = $gDirLang['suggest_category'];
$menu['suggest-category']['url'] = $url."suggest-category.php?id=".$aCategory;
}
}
***Save file***
Is there something missing in this code to make it work in 2.1 as it did in 2.0.2
Can anyone take a look at it please?
Sorry to ask again:poka:
Dave Baker
02-11-2007, 11:16 PM
Ok,
***Open suggest-category.php and find code***
/** gets information about current category **/
$category = $Category->row("*", "id=".$id_category);
$cid = $category['id'];
unset($id,$id_category);
$gDirSmarty->assign_by_ref('category', $category);
if($category['locked'])
{
$error = true;
$msg = $gDirLang['error_category_locked'];
}
/** defines tab name for this page **/
$gTab = 'suggest-category';
if (isset($_POST['add_category']))
{
if (!$category['locked'])
{
$temp['id_parent'] = $cid;
$temp['id_editor'] = $gDirEditor ? $gDirEditor['id'] : 0;
***Replace with the following code***
/** gets information about current category **/
$category = $Category->row("*", "id=".$id_category);
$cid = $category['id'];
unset($id,$id_category);
$gDirSmarty->assign_by_ref('category', $category);
if($category['locked'])
{
// $error = true;
$msg = $gDirLang['error_category_locked'];
}
/** defines tab name for this page **/
$gTab = 'suggest-category';
if (isset($_POST['add_category']))
{
if (!$category['locked'] OR $category['locked'])
{
$temp['id_parent'] = $cid;
$temp['id_editor'] = $gDirEditor ? $gDirEditor['id'] : 0;
***Save file***
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.