Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28

Thread: how can I ajust listing browse.php like this ?

  1. #11
    Join Date
    Sep 2003
    Location
    London UK
    Posts
    1,654

    Default

    Thank you

    yonny@home and Andre.

    I will start working on it now and post what i have done here
    when i am done.


    regards


    albert


    my demo site:
    awddesign.co.uk/awd_cars2/

  2. #12
    Join Date
    Sep 2003
    Location
    Australia
    Posts
    77

    Default

    Albert, i'm hoping you better understand the above than I do, I can see teh code and have fiddled around with it but had no luck. I may be just simply not chnaging the right things :?:

    So I'll wait to see what you come up with.

    Thanks

    Greg

  3. #13
    Join Date
    Jul 2003
    Posts
    60

    Default

    Just one more point to start:
    between Line 555 and 556 I added a Line :
    Code:
    echo "<tr>";
    below is the hole Part again with the Adittion inside for better Orientation ,
    I just told the Programm to add one row after each item, its not really difficult and not much that changes, but i think you can go further from there.

    Code:
    // grab the rest of the listing's data
    					$sql2 = "SELECT " . $config&#91;table_prefix&#93; . "listingsDBElements.field_value, " . $config&#91;table_prefix&#93; . "listingsFormElements.field_type FROM " . $config&#91;table_prefix&#93; . "listingsDBElements, " . $config&#91;table_prefix&#93; . "listingsFormElements WHERE &#40;&#40;" . $config&#91;table_prefix&#93; . "listingsDBElements.listing_id = $current_ID&#41; AND &#40;" . $config&#91;table_prefix&#93; . "listingsFormElements.display_on_browse = 'Yes'&#41; AND &#40;" . $config&#91;table_prefix&#93; . "listingsFormElements.field_type <> 'textarea'&#41; AND &#40;" . $config&#91;table_prefix&#93; . "listingsDBElements.field_name = " . $config&#91;table_prefix&#93; . "listingsFormElements.field_name&#41;&#41; ORDER BY " . $config&#91;table_prefix&#93; . "listingsFormElements.rank";
    					$recordSet2 = $conn->Execute&#40;$sql2&#41;;
    						if &#40;$recordSet2 === false&#41;
    						&#123;
    							log_error&#40;$sql2&#41;;
    						&#125;
    					while &#40;!$recordSet2->EOF&#41;
    					&#123;
    						$field_value = make_db_unsafe &#40;$recordSet2->fields&#91;field_value&#93;&#41;;
    						$field_type = make_db_unsafe &#40;$recordSet2->fields&#91;field_type&#93;&#41;;
    						echo "<tr>";
    						echo "<td align=\"center\" class=\"search_row_$count\">";
    
    						if &#40;$field_type == "select-multiple" OR $field_type == "option" OR $field_type == "checkbox"&#41;
    						&#123;
    							// handle field types with multiple options

  4. #14
    Join Date
    Sep 2003
    Location
    Australia
    Posts
    77

    Default

    OK, I can see what you are suggesting but its not (unless I am missing something here) what I really want to do. Editing the table format affects all the fields and teh way they are displayed, I want to work with each field (that I specify) on its own.

    What I want to know is how do I call a specific field on its own, not a part of the normal browse function (i.e. not via the browse display yes or no function within the listings field template).

    As I said new to php but slowly learning, but I was hoping I could simply define the field like $price=field_value and then have the $price wherever I wanted.

    I would then call each field seperately as said on their own and place them in a format that I choose.

    Hope that makes sense :?:

    Greg

  5. #15
    Join Date
    Jul 2003
    Posts
    60

    Default

    I understand, but sorry i cannot help you with that.
    It is more php/sql related and you have to rewrite or add your own sql queries and the related php code for matching your needs.
    Which offcourse isnt that easy as just modifiying the layout.
    But with a little more of learning it should be possible to succeed
    Maybe some other person here can help you better,
    since i am not better in doing that than you are, and actually have no need for these Features.

  6. #16
    Join Date
    Jan 2003
    Posts
    201

    Default

    Quote Originally Posted by gwmbox
    OK, I can see what you are suggesting but its not (unless I am missing something here) what I really want to do. Editing the table format affects all the fields and teh way they are displayed, I want to work with each field (that I specify) on its own.

    What I want to know is how do I call a specific field on its own, not a part of the normal browse function (i.e. not via the browse display yes or no function within the listings field template).

    As I said new to php but slowly learning, but I was hoping I could simply define the field like $price=field_value and then have the $price wherever I wanted.

    I would then call each field seperately as said on their own and place them in a format that I choose.

    Hope that makes sense :?:

    Greg
    Did you not see my post above? It shows you how to pull a specific field.

  7. #17
    Join Date
    Sep 2003
    Location
    Australia
    Posts
    77

    Default

    Quote Originally Posted by Andre
    The sql to request a specific field such as price is:
    Code:
    $sql = "SELECT field_caption, field_name FROM listingsFormElements 
    WHERE &#40;display_on_browse = 'Yes'&#41; AND &#40;field_type <> 'textarea'&#41; AND &#40;field_name='Price'&#41; 
    ORDER BY browse_rank";
    Like I said in the previous post, I'm not using Ryan's version so your column name could be different in your table.
    Yes I did see this and I tried inserting that code and then was unsure how to actually call the field itself, this above I assume is how to get the field called, but how to display it, do I use $price, $name_value or something totally different.

    Sorry to be dizzy :oops: here I just could not get it to work for me.

    Greg

  8. #18
    Join Date
    Jan 2003
    Posts
    201

    Default

    Quote Originally Posted by gwmbox
    Quote Originally Posted by Andre
    The sql to request a specific field such as price is:
    Code:
    $sql = "SELECT field_caption, field_name FROM listingsFormElements 
    WHERE &#40;display_on_browse = 'Yes'&#41; AND &#40;field_type <> 'textarea'&#41; AND &#40;field_name='Price'&#41; 
    ORDER BY browse_rank";
    Like I said in the previous post, I'm not using Ryan's version so your column name could be different in your table.
    Yes I did see this and I tried inserting that code and then was unsure how to actually call the field itself, this above I assume is how to get the field called, but how to display it, do I use $price, $name_value or something totally different.

    Sorry to be dizzy :oops: here I just could not get it to work for me.

    Greg
    Most of this sql statement is already in the listing_browse page. To request a specific field such as price you only have to specify the field name in the SQL. In the example above I added
    Code:
     AND &#40;field_name='Price'&#41;

  9. #19
    Join Date
    Sep 2003
    Location
    Australia
    Posts
    77

    Default

    Andre

    I know you know what your talking about , but I have tried everything and cannot get it to work, maybe you can attach or send me a working example for me so I can have a look at the coding and then the penny might just drop.

    Greg

  10. #20
    Join Date
    Sep 2003
    Location
    Australia
    Posts
    77

    Default

    Has anyone else done this or have any other ideas?

    Greg

Similar Threads

  1. VOW NAR compliance
    By lostsoul in forum HELP (CLOSED)
    Replies: 2
    Last Post: 09-05-2004, 01:34 PM
  2. Features Listing By State or even city
    By ican in forum Feature Request (CLOSED)
    Replies: 4
    Last Post: 03-29-2004, 06:11 PM
  3. Couple questions... - ANSWERED
    By hbaker in forum HELP (CLOSED)
    Replies: 12
    Last Post: 11-12-2003, 12:42 AM
  4. Searching Within The Listing Editor?(Added 1.1.4)
    By mightybox in forum HELP (CLOSED)
    Replies: 3
    Last Post: 09-19-2003, 03:13 PM
  5. Selecting Agent upon New Listing
    By Anonymous in forum HELP (CLOSED)
    Replies: 2
    Last Post: 08-07-2003, 09:18 AM

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
  •