Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod Favourite Recipes
- » Lookup SOBI Record and display link,...
Lookup SOBI Record and display link, based on AuthorID
Lookup SOBI Record and display link, based on AuthorID
// example: return 23;
// IMPROVED VERSION FOR JOOMLA 1.5, SPECIFICALLY FOR GETTING CATEGORIES
// INCLUDING BLOG OR LIST STYLE CATEGORY PAGES
if ($option == "com_content" && $view == "article") {
//if ($option == "com_content") {
//if ($view == "article") {
//if (1==1) {
/* if it's an article page without the catid mentioned in the url */
$nullDate = $db->Quote($db->getNullDate());
$my_id = $db->getEscaped((int)$id);
$query = "SELECT created_by"
. " FROM #__content WHERE id = '$my_id'";
$db->setQuery( $query, 0, 1 );
$row = $db->loadObject();
// $category_id = $row->catid;
// $section_id = $row->sectionid;
$authorid = $row->created_by;
//echo $option;
//echo $view;
//echo "My ID: " . $my_id;
//echo "Hello";
//echo $authorid;
$query2 = "SELECT itemid, title FROM #__sobi2_item WHERE owner = " . $authorid;
//echo $query2;
$db->setQuery( $query2, 0, 1 );
$row = $db->loadObject();
$authorsbiz = $row->title;
$item = $row->itemid;
// echo $item;
// echo "See full Profile on " . $authorsbiz;
$url = "http://mysite.com/index.php?option=com_ … 2Id=" . $item;
// echo $url;
echo "*See full Profile on <a href='" .$url. "'>" . $authorsbiz . "</a>" ."*";
//print "<a href=\"http://www.link.com/=$id\">$id</a>";
}
///////////////////////////////////
- Index
- » MetaMod
- » MetaMod Favourite Recipes
- » Lookup SOBI Record and display link,...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Posts this week:
- 2
- User Info:
- Total Users:
- 7642
- Newest User:
- mary26
- Members Online:
- 0
- Guests Online:
- 165
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked