Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

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>";
}

///////////////////////////////////

kenlyle
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1689
Total Polls:
6
Total Posts:
5941
Posts this week:
1
User Info:
 
Total Users:
5361
Newest User:
scotti64d
Members Online:
0
Guests Online:
209

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