Results 1 to 3 of 3

Thread: {isfavorite} tag for Featured listing and Search listing sections

  1. #1
    Join Date
    Aug 2004
    Location
    Săo Paulo - Brasil.
    Age
    39
    Posts
    151

    Default {isfavorite} tag for Featured listing and Search listing sections

    Olá

    This tag show if the listing is or is not favorite, for Featured listing and Search listing sections. Can be used for CSS purposes too.

    I am testing on SVN. Rev. 2482.

    For listing.inc.php after line 705 include.

    PHP Code:
    // Start {isfavorite} featured template section tag
                    
    if (isset($_SESSION['userID'])) {
                        
    $userID $misc->make_db_safe($_SESSION['userID']);
                        
    $sql1 "SELECT listingsdb_id FROM " $config['table_prefix'] . "userfavoritelistings WHERE ((listingsdb_id = $current_ID) AND (userdb_id=$userID))";
                        
    $recordSet1 $conn->Execute($sql1);
                        if (
    $recordSet1 === false) {
                            
    $misc->log_error($sql1);
                        }
                        
    $favorite_listingsdb_id $misc->make_db_unsafe ($recordSet1->fields['listingsdb_id']);
                            if (
    $favorite_listingsdb_id !== $current_ID) {
                                
    $isfavorite "no";
                                
    $featured_template_section $page->parse_template_section($featured_template_section'isfavorite'$isfavorite);
                            } else {
                                
    $isfavorite "yes";
                                
    $featured_template_section $page->parse_template_section($featured_template_section'isfavorite'$isfavorite);
                            }
                    }
    // End {isfavorite} featured template section tag 
    For search.inc.php after line 1462 include.

    PHP Code:
    // Start {isfavorite} search result template section tag
                    
    if (isset($_SESSION['userID'])) {
                        
    $userID $misc->make_db_safe($_SESSION['userID']);
                        
    $sql1 "SELECT listingsdb_id FROM " $config['table_prefix'] . "userfavoritelistings WHERE ((listingsdb_id = $current_ID) AND (userdb_id=$userID))";
                        
    $recordSet1 $conn->Execute($sql1);
                        if (
    $recordSet1 === false) {
                            
    $misc->log_error($sql1);
                        }
                        
    $favorite_listingsdb_id $misc->make_db_unsafe ($recordSet1->fields['listingsdb_id']);
                            if (
    $favorite_listingsdb_id !== $current_ID) {
                                
    $isfavorite "no";
                                
    $search_result $page->parse_template_section($search_result'isfavorite'$isfavorite);
                            } else {
                                
    $isfavorite "yes";
                                
    $search_result $page->parse_template_section($search_result'isfavorite'$isfavorite);
                            }
                    }
    // End {isfavorite} search result template section tag 
    [ ]
    Renato
    Attached Files Attached Files

    ...a blind padawan...

  2. #2
    Join Date
    Jul 2003
    Location
    California
    Age
    43
    Posts
    4,229

    Default Re: {isfavorite} tag for Featured listing and Search listing sections

    I assume this is what you PM'd me for access to the feature request system for. I just implemented this into the SVN.
    Open-Realty 2 Documentation

    ~The Difference Between an ORDEAL and an ADVENTURE is ATTITUDE~

  3. #3
    Join Date
    Aug 2004
    Location
    Săo Paulo - Brasil.
    Age
    39
    Posts
    151

    Default Re: {isfavorite} tag for Featured listing and Search listing sections

    Quote Originally Posted by Mick View Post
    I assume this is what you PM'd me for access to the feature request system for. I just implemented this into the SVN.
    Ohhh... Tnks Mick!

    In this case, the SandBox was a shortcut to my Feature Request.

    [ ]
    Renato.
    Last edited by Renato.Dias; 10-04-2009 at 03:52 PM. Reason: rolleyes to

    ...a blind padawan...

Similar Threads

  1. [Featured listing] How to show listing details in full width in joomla?
    By plenty in forum Templates - Help/Ideas/Discussion (CLOSED)
    Replies: 4
    Last Post: 04-08-2009, 11:03 PM
  2. Remove first <br> from Listing Template Sections
    By bit in forum General Help (CLOSED)
    Replies: 1
    Last Post: 02-13-2007, 03:06 PM
  3. How do I break apart Listing Template Sections?
    By godriguez in forum General Help (CLOSED)
    Replies: 7
    Last Post: 02-01-2007, 05:28 PM
  4. Showing random listing as featured listing on main page
    By cellularguy in forum General Help (CLOSED)
    Replies: 1
    Last Post: 06-17-2005, 02:29 AM
  5. Replies: 9
    Last Post: 08-13-2003, 02:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •