Results 1 to 15 of 15

Thread: How to list the random listing block horizontally

  1. #1
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default How to list the random listing block horizontally

    Hi all,

    Is there any way to list the random listing block horizontally rather than vertically?

    Cheers
    Mitchell

  2. #2
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Where are you trying to place the block??? Is the main page content, in the center?

    If so, my first suggestion would be to make a duplicate copy of the original block... Both the .php file and the .html file. Edit the .php file to reflect the new name given to the block. Then edit the .html file for horizonal use. Its just a matter of changing the HTML code to display it the way you want
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  3. #3
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    Quote Originally Posted by FSGDAG View Post
    Where are you trying to place the block??? Is the main page content, in the center?
    Thanks for the quick reply, I want to do it the same way as I have done on this site on the main page;
    http://www.weddingsonly.com.au/index.php
    Please check the "IN THE SPOTLIGHT" section, I have done it but not the correct way, so I need to do it correctly.

    I checked the bolck's html it doesn't have any thing like table, or horizontal listing!

    regards
    Mitchell

  4. #4
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    I'm not sure what you mean by "I have done it but not the correct way"?!?!? What is incorrect about the way you did it there??

    Just add any HTML code to display it the way you want in the HTML file. Another words, customize the HTML code in the HTML file for the way you want it to display. Standard HTML code will work fine in that file.
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  5. #5
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    If it's working, it's the "correct" way, and it looks like it's working to me.

  6. #6
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    So what I have done is I used a table and 5 X Random Block Listing, here is the code below;


    <tr align="middle">
    <td width=20%><%block_random_listing max_item="1"%></td>
    <td width=20%><%block_random_listing max_item="1"%></td>
    <td width=20%><%block_random_listing max_item="1"%></td>
    <td width=20%><%block_random_listing max_item="1"%></td>
    <td width=20%><%block_random_listing max_item="1"%></td>
    </tr>
    </table>

    The problem here is that as there are five of the same code, SOMETIMES the suppliers might be duplicated. I need to use the code ones only so I don't get the same suppliers listed twice or even 5 five times (JACKPOT )

  7. #7
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    I wouldn't be too concerned about that.

    But if you are concerned, copy the block, rename it and then rewrite the code in it to put it into a table.

  8. #8
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    Quote Originally Posted by Bruceper View Post
    I wouldn't be too concerned about that.

    But if you are concerned, copy the block, rename it and then rewrite the code in it to put it into a table.
    Do I have to Modify
    block.random_listing_rows.html

    or
    block.random_listing.php

    or both to add list them in one row?

  9. #9
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    you need to edit block.random_listing_rows.html to change the HTML

    If you're copying them then you would need to edit both.

  10. #10
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    Thanks Bruce, all done.

  11. #11
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Quote Originally Posted by Mitchell View Post
    <tr align="middle">
    <td width=20%><%block_random_listing max_item="1"%></td>
    <td width=20%><%block_random_listing max_item="1"%></td>
    <td width=20%><%block_random_listing max_item="1"%></td>
    <td width=20%><%block_random_listing max_item="1"%></td>
    <td width=20%><%block_random_listing max_item="1"%></td>
    </tr>
    </table>

    Instead of doing whats above, why couldn't you do


    HTML Code:
    <tr align="middle">
        <td width=100%><%block_random_listing max_item="5"%></td>
    </tr>
    </table>
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  12. #12
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    Quote Originally Posted by FSGDAG View Post
    Instead of doing whats above, why couldn't you do

    [/HTML]
    Well, I tried that and it listed all five Vertically, I have fixed it now, have a look below;
    http://www.weddingsonly.com.au/index.php

    Let me know if you would like the code.

    Thank you any way
    Mitchell

  13. #13
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Just for giggles... Try this

    HTML Code:
    <tr align="middle">
        <td width=100%><%block_random_listing columns="1" max_item="5"%></td>
    </tr>
    </table>
    If you try it, let me know if it works
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  14. #14
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    Quote Originally Posted by FSGDAG View Post

    If you try it, let me know if it works
    Sorry it didn't work, it list all five in one column, under one another.

    This is what I have done and worked;
    in the main page I change it to;

    PHP Code:
        <table align="middle" cellspacing="2" cellpadding="2" border="0">
    <
    tr align="middle">
        <%
    block_random_listing max_item="5"%>
    </
    tr>
    </
    table
    and I modified the block_random_listing_rows.html block to this;

    PHP Code:
    <%$hook_html_block_random_listing_rows_begin%>

    <
    td width=20%>
        <
    a href="<%$site_url%>/<%$detail_page_url%>" name="link_<%$link_id%>"><img src="http://image.picoshot.com/thumbnail.php?url=<%$url%>" alt="<%$title%>" align="middle"><br /><b><%$title|truncate:28%></b></a>
        <
    br />
        <%
    $description|truncate:50%>
    </
    td>          

    <%
    $hook_html_block_random_listing_rows_end%> 
    I hope this saves some one elses time.
    Last edited by Mitchell; 04-22-2008 at 01:49 AM.

  15. #15
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    I see your using the

    HTML Code:
    <%$hook_html_block_random_listing_rows_begin%>
    statement, so this would be coding for version 6. Probably good to note that so that someone else using 5.4 and searching the forums wont get screwed up by it
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

Similar Threads

  1. Random paid listings block?
    By akamaka in forum Blocks and Modification
    Replies: 15
    Last Post: 11-04-2008, 11:46 AM
  2. emails from listing onto mailing list
    By CotswoldAdvisor in forum Blocks and Modification
    Replies: 5
    Last Post: 03-19-2008, 07:30 AM
  3. Random Site of The Day
    By echo@ in forum Blocks and Modification
    Replies: 6
    Last Post: 11-24-2007, 10:46 PM
  4. random link ?
    By dbmg in forum v5.x
    Replies: 6
    Last Post: 03-28-2003, 02:07 AM

Posting Permissions

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