Start arrow Forum
 
Polska wersjaEnglish version
 
Fun with Joomla!  


mtk
User

Senior Boarder
Posts: 17
graphgraph
Karma: 0  
Table - Weblink Category - 2006/12/29 14:41 Hello,
the WebLinks mambot does not work on Table - Weblink Category...
MtK - Smart Internet Solutions
Gan Pooh-A-Dov | Gan Maayan
Software Engineering | Date Cafe
  | | | The administrator has disabled public write access.
mtk
User

Senior Boarder
Posts: 17
graphgraph
Karma: 0  
Re:Table - Weblink Category - 2006/12/29 14:45 a little testing shows the it does not work well with any weblink menu form.

the categories are duplicated and no weblinks are shown...
MtK - Smart Internet Solutions
Gan Pooh-A-Dov | Gan Maayan
Software Engineering | Date Cafe
  | | | The administrator has disabled public write access.
absalom
User

Fresh Boarder
Posts: 1
graphgraph
Karma: 0  
Re:Table - Weblink Category - 2007/01/03 03:53 Comment out line 35 in the com_weblinks_bot.php

Which is this line:
if (function_exists ('AddExtMenuItem')) AddExtMenuItem ($element);else AddMenuItem($category->title,$link, $lev);

It then removes the dupe link as the statement on line 36 manages the weblink category fine.
  | | | The administrator has disabled public write access.
mtk
User

Senior Boarder
Posts: 17
graphgraph
Karma: 0  
Re:Table - Weblink Category - 2007/01/03 14:55 Hi,
this partially solves the problem.

when having a menu item linking to the entire weblink component, sefservicemap shows only the categories.

when having a menu item linking to one of the categories, it does not show its weblinks...
MtK - Smart Internet Solutions
Gan Pooh-A-Dov | Gan Maayan
Software Engineering | Date Cafe
  | | | The administrator has disabled public write access.
Cadinos
User

Fresh Boarder
Posts: 2
graphgraph
Karma: 0  
Re:Table - Weblink Category - 2007/01/03 17:21 I rewrote it a while ago and added that for my site. I hope the code shows in the post:
Code:

  <? //******************************************************* //* SEF Service Map Component Integrator //* http://fun.kubera.org //* (C) Radoslaw Kubera //* license http://www.gnu.org/copyleft/gpl.html GNU/GPL //******************************************************* /** ensure this file is being included by a parent file */ defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); function Weblinks_category ($level$id,$Itemid,$params) {   $show_cat_icons=intval($params->get'show_cat_icons''1' )) ;   $show_cat_desc=intval($params->get'show_cat_desc''1' )) ;   global $database;   $database->setQuery("SELECT * FROM #__categories where parent_id='$id' and section='com_weblinks' and published >='1'"   ." order by ordering");   $categories=$database->loadObjectList();   $lev=$level+1;   if (count($categories!=0))   {     foreach ($categories as $category)     {       $description '';       if ($show_cat_desc$description $category->name;       $element->description $description;       $link="index.php?option=com_weblinks&catid=".$category->id."&Itemid=".$Itemid;       $element->name $category->title;       $element->link $link;       $element->level $lev;       if ($show_cat_icons$element->image 'weblinks_world.gif'; else $element->image='none';       $element->icon_path='/mambots/com_sefservicemap/';       //AddExtMenuItem($element);              if (function_exists ('AddExtMenuItem')) AddExtMenuItem ($element);else AddMenuItem($category->title,$link$lev);        $links Weblinks_links($lev$category->id$params);       foreach ($links as $link)       {         if (function_exists ('AddExtMenuItem')) AddExtMenuItem ($link); else AddMenuItem ($link->name,$link->link,$link->level);       }       Weblinks_category($lev$category->id,$Itemid,$params);     }   } } function Weblinks_links($level$catid$params) {   $weblinks = array();   $weblinks null;      $element = array();      $show_lin_icons=intval($params->get'show_lin_icons''1' )) ;   $show_lin_desc=intval($params->get'show_lin_desc''1' )) ;      global $database;      $database->setQuery("SELECT * FROM #__weblinks where catid='$catid' and published >='1'"   ." order by ordering");   $links=$database->loadObjectList();   $lev=$level+1;     if (count($links!=0))   {     foreach ($links as $link)     {       $element null;              $description '';       if ($show_lin_desc$description $link->description;       $element->description $description;       $element->name $link->title;              $link="index.php?option=com_weblinks&task=view&catid=".$catid."&id=".$link->id;       $element->link $link;              $element->level $lev;              if ($show_lin_icons$element->image 'weblinks_world.gif'; else $element->image='none';       $element->icon_path='/mambots/com_sefservicemap/';              $weblinks[] = $element;     }   }   return $weblinks; } function com_weblinks_bot ($level,$link,$Itemid,$params) {   $catid smGetParam($link,'catid',0);   $task smGetParam($link,'task','');   if (!$taskWeblinks_category($level,$catid,$Itemid,$params); } ?>

File Attachment:
File name: weblinks_bot_1.0.11.zip
File size:5384 bytes
  | | | The administrator has disabled public write access.
mtk
User

Senior Boarder
Posts: 17
graphgraph
Karma: 0  
Re:Table - Weblink Category - 2007/01/03 17:31 it shows & again partially works.
on a category menu item it shows nothing, but on a full weblink menu item it works fine...
MtK - Smart Internet Solutions
Gan Pooh-A-Dov | Gan Maayan
Software Engineering | Date Cafe
  | | | The administrator has disabled public write access.
Cadinos
User

Fresh Boarder
Posts: 2
graphgraph
Karma: 0  
Re:Table - Weblink Category - 2007/01/03 18:18 I probably broke something like sub categories, but that might work for tables now:

Code:

  <? //******************************************************* //* SEF Service Map Component Integrator //* http://fun.kubera.org //* (C) Radoslaw Kubera //* license http://www.gnu.org/copyleft/gpl.html GNU/GPL //******************************************************* /** ensure this file is being included by a parent file */ defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); function Weblinks_category ($level$id,$Itemid,$params) {   $show_cat_icons=intval($params->get'show_cat_icons''1' )) ;   $show_cat_desc=intval($params->get'show_cat_desc''1' )) ;   global $database;   //$database->setQuery("SELECT * FROM #__categories where id='$id' and section='com_weblinks' and  published >='1'"   $database->setQuery("SELECT * FROM #__categories where parent_id='$id' and section='com_weblinks' and published >='1'"   ." order by ordering");   $categories=$database->loadObjectList();   $lev=$level+1;   if (count($categories!=0))   {     foreach ($categories as $category)     {       $description '';       if ($show_cat_desc$description $category->name;       $element->description $description;       $link="index.php?option=com_weblinks&catid=".$category->id."&Itemid=".$Itemid;       $element->name $category->title;       $element->link $link;       $element->level $lev;       if ($show_cat_icons$element->image 'weblinks_world.gif'; else $element->image='none';       $element->icon_path='/mambots/com_sefservicemap/';       //AddExtMenuItem($element);              if (function_exists ('AddExtMenuItem')) AddExtMenuItem ($element);else AddMenuItem($category->title,$link$lev);        $links Weblinks_links($lev$category->id$params);       foreach ($links as $link)       {         if (function_exists ('AddExtMenuItem')) AddExtMenuItem ($link); else AddMenuItem ($link->name,$link->link,$link->level);       }       Weblinks_category($lev$category->id,$Itemid,$params);     }   } } function Weblinks_category2 ($level$id,$Itemid,$params) {   $show_cat_icons=intval($params->get'show_cat_icons''1' )) ;   $show_cat_desc=intval($params->get'show_cat_desc''1' )) ;   global $database;   $database->setQuery("SELECT * FROM #__categories where id='$id' and section='com_weblinks' and published >='1'"   ." order by ordering");   $categories=$database->loadObjectList();   $lev=$level+1;   if (count($categories!=0))   {     foreach ($categories as $category)     {       $description '';       if ($show_cat_desc$description $category->name;       $element->description $description;       $link="index.php?option=com_weblinks&catid=".$category->id."&Itemid=".$Itemid;       $element->name $category->title;       $element->link $link;       $element->level $lev;       if ($show_cat_icons$element->image 'weblinks_world.gif'; else $element->image='none';       $element->icon_path='/mambots/com_sefservicemap/';       //AddExtMenuItem($element);              if (function_exists ('AddExtMenuItem')) AddExtMenuItem ($element);else AddMenuItem($category->title,$link$lev);        $links Weblinks_links($lev$category->id$params);       foreach ($links as $link)       {         if (function_exists ('AddExtMenuItem')) AddExtMenuItem ($link); else AddMenuItem ($link->name,$link->link,$link->level);       }       Weblinks_category($lev$category->id,$Itemid,$params);     }   } } function Weblinks_links($level$catid$params) {   $weblinks = array();   $weblinks null;      $element = array();      $show_lin_icons=intval($params->get'show_lin_icons''1' )) ;   $show_lin_desc=intval($params->get'show_lin_desc''1' )) ;      global $database;      $database->setQuery("SELECT * FROM #__weblinks where catid='$catid' and published >='1'"   ." order by ordering");   echo "test: SELECT * FROM #__weblinks where catid='$catid' and published >='1'";   $links=$database->loadObjectList();   $lev=$level+1;     if (count($links!=0))   {     foreach ($links as $link)     {       $element null;              $description '';       if ($show_lin_desc$description $link->description;       $element->description $description;       $element->name $link->title;              $link="index.php?option=com_weblinks&task=view&catid=".$catid."&id=".$link->id;       $element->link $link;              $element->level $lev;              if ($show_lin_icons$element->image 'internet-web-browser.png'; else $element->image='none';       $element->icon_path='/mambots/com_sefservicemap/';              $weblinks[] = $element;     }   }   return $weblinks; } function com_weblinks_bot ($level,$link,$Itemid,$params) {   $catid smGetParam($link,'catid',0);   $task smGetParam($link,'task','');   if ((!$task) && ($catid != 0)) Weblinks_category2($level,$catid,$Itemid,$params);   elseif (!$taskWeblinks_category($level,$catid,$Itemid,$params); } ?>

  | | | The administrator has disabled public write access.
 

Lost Password?? No account yet? Register

Forum Info
Our users have posted a total of 372 articles.
We have 1101 registered users.
The newest registered user is: skrap
In total there are 88 users online: 88 guests and 0 registered
Registered Users online: none