Results 1 to 11 of 11

Thread: Sponsor under category listing in front page

  1. #1
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default Sponsor under category listing in front page

    This is not a hack actually, but a cheap trick. You just need to utilitize description field in category table.
    Admin cp -> Categories -> View -> Edit -> Description.

    For example:
    Code:
    <font size=1>Sponsored by: <a href=http://www.php.net>www.mysql.com</a>
    You can use regular html code as well as css to change the appearance.
    Attached Images Attached Images

  2. #2
    Join Date
    Jun 2002
    Location
    Bangalore
    Posts
    156

    Default

    Dody : I wanted a minor change in the appearance of whats mentioned above, but not sure, how to achieve that !?

    Right now, only the name of the category appears next to the category image ( thats by default ).

    But what if, i wanted to have a line or two description of that category along with a sponsored By link. These two lines and the sponsor appears below the image and the name of the category.

    I want a change here : That, The Category name, the two lines of description and the sponsor By link should come next to the image, which means, the size of the image will be bigger than the normaly shown above. How can i change to this structure ???

    Thanks much

    Cheers
    Thru' the Unknown, We Shall find the New !
    DotGlum : My Online Identity
    DearSunShine :: A Beautiful Mind | MyBrandInc : Bitten By the StartUp Bug !?!
    InstallBot : Script Installation service ! | HostoHolic : WebHosting Directory !

  3. #3
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    I can't understand at all. Please post the picture if it's possible.

    Do you mean a small banner under category listing? If so, just write this in description field:
    Code:
    <font size=1>Sponsored by: <br>
    <a href=http://www.php.net>
    <img src=http://www.domain.com/images/small_banner.gif border=0>
    </a>

  4. #4
    Join Date
    Jun 2002
    Location
    Bangalore
    Posts
    156

    Default

    Okay, let me give a sample of HTMl code of the category appearance for what I am looking at :


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> Sample Category Appearance </TITLE>

    </HEAD>

    <BODY>

    <TABLE cellpadding=2 cellspacing=2 border=0 width=45%>
    <TR>
    <TD><IMG SRC="C:/WINDOWS/Desktop/freebsd.gif" WIDTH="72" HEIGHT="81" BORDER="0" ALT=""></TD>
    <TD><A HREF="http://wwwhostoholic.com/unix.php">Unix Hosting</A><BR>
    The Most Stable platform for hosting.<BR>
    <A HREF="http://showcase.hostoholic.com/unix.html">Unix Showcase List</A>
    </TD>
    </TR>
    </TABLE>


    </BODY>
    </HTML>
    How can this be done for category appearance on the home page ??

    Thanks for your help

    Cheers
    Thru' the Unknown, We Shall find the New !
    DotGlum : My Online Identity
    DearSunShine :: A Beautiful Mind | MyBrandInc : Bitten By the StartUp Bug !?!
    InstallBot : Script Installation service ! | HostoHolic : WebHosting Directory !

  5. #5
    Join Date
    Jun 2002
    Location
    Bangalore
    Posts
    156

    Default

    Here is the sample category look of what I am looking to achieve.

    Whats shown below in the attached image :

    Only the freeBSD logo is an image and the rest is text which can be HTMl formatted. The code mentioned in the previous post achieved that. But i am not sure where exactly to put such a code or which file to edit ??

    Thank you
    Attached Images Attached Images
    Last edited by ideavirus; 06-30-2003 at 10:05 PM.
    Thru' the Unknown, We Shall find the New !
    DotGlum : My Online Identity
    DearSunShine :: A Beautiful Mind | MyBrandInc : Bitten By the StartUp Bug !?!
    InstallBot : Script Installation service ! | HostoHolic : WebHosting Directory !

  6. #6
    Join Date
    Jun 2002
    Location
    Bangalore
    Posts
    156

    Default

    Can someone help with this as i need to get this right urgently ??

    Thank you for your time.
    Thru' the Unknown, We Shall find the New !
    DotGlum : My Online Identity
    DearSunShine :: A Beautiful Mind | MyBrandInc : Bitten By the StartUp Bug !?!
    InstallBot : Script Installation service ! | HostoHolic : WebHosting Directory !

  7. #7
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    i really haven't followed this thread but...

    the category listing is built in category.class.php file in the lib folder.

    find the Display function and look for the line that begins with "if($this->type_of_list=="STANDART_LIST") {"

    Starting with the next line is where the actual category line is built.
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  8. #8
    Join Date
    Jun 2002
    Location
    Bangalore
    Posts
    156

    Default

    esm : Thank you for helping me out.

    Okay, since you mentioned you haven't followed the thread, let me say again :

    The image in this thread is the default way the categories appear in indexu ( the image along with the description if any ).

    However, what i want to get is the shown in the image attached in one of my previous post ( the image along with description ... the freedBSD example ).

    I did find the code you mentioned in your previous post, but not sure, how to achieve what i want ?

    Could you kindly help me with the code.

    Thanks much in advance

    Cheers
    Attached Images Attached Images
    Thru' the Unknown, We Shall find the New !
    DotGlum : My Online Identity
    DearSunShine :: A Beautiful Mind | MyBrandInc : Bitten By the StartUp Bug !?!
    InstallBot : Script Installation service ! | HostoHolic : WebHosting Directory !

  9. #9
    Join Date
    Jun 2002
    Location
    Bangalore
    Posts
    156

    Default

    Hello,

    I managed and decided to go with something like shown in the image attached with this post.

    However, i just want a minor change, that :

    How do i align the link/word Unix Hosting to the right side instead of left side ?? I just want to align the word Unix Hosting to right and nothing else and likewise with the rest fo category names !

    Thank you
    Attached Images Attached Images
    Thru' the Unknown, We Shall find the New !
    DotGlum : My Online Identity
    DearSunShine :: A Beautiful Mind | MyBrandInc : Bitten By the StartUp Bug !?!
    InstallBot : Script Installation service ! | HostoHolic : WebHosting Directory !

  10. #10
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Originally posted by ideavirus
    How do i align the link/word Unix Hosting to the right side instead of left side ?? I just want to align the word Unix Hosting to right and nothing else and likewise with the rest fo category names !
    a couple of things:

    [list=1][*]do you have a different image for each category?
    if so i'm thinking you will need to add a field to the category table and put the image name in that field for that category.

    ooops...I just saw an image field so forget this....
    [*]to align things to the right use something like the following:
    Code:
    <p align=right>$cat_name</p> or
    <div align=right>$cat_name</div>
    or if in a table then <td align=right>$cat_name</td>
    [/list=1]

    I think this is something like what you want

    Code:
    <TABLE width=100% cellpadding=4 cellspacing=0>
       <TR>
          <TD ALIGN=right COLSPAN=2>
             <A HREF="$cat_url">$cat_name</A>
          </TD>
       </TR>
       <TR>
          <TD ROWSPAN=2>
             <A HREF="$cat_url">$image</A>
          </TD>
          <TD WIDTH="100%">
             $cat_desc
          </TD>
       </TR>
       <TR><TD WIDTH="100%">
             <A HREF="$hosted_by">$hosted_by</A>
          </TD>
       </TR>
    </TABLE>
    convert that to INDEXU code:

    Code:
    $category .="<TABLE width=100% cellpadding=4 cellspacing=0>";
    $category .="<TR><TD ALIGN=right COLSPAN=2><A HREF=\"$cat_url\">$cat_name</A></TD></TR>";
    $category .="<TR><TD ROWSPAN=2><A HREF=\"$cat_url\">$image</A></TD>";
    $category .="<TD WIDTH="100%">$cat_desc</TD></TR>";
    $category .="<TR><TD WIDTH="100%">$hosted_by</TD></TR>";
    $category .="</TABLE>";
    yep, the td width is set at 100% on purpose

    the above would replace

    Code:
                $category .= "<p>";
                $category .= "$image <FONT FACE=$cat_font_face SIZE=$cat_font_size>";
                $category .= "<B><A class=lblack HREF=\"$cat_url\">$cat_name</A></B> $html_number_of_links \n";
                $category .= "$number_of_links\n";
                if($this->show_description) {
                  if(!empty($cat_description)) $category .= "<br>";
                  //$category .= "<a style='font-size: 11px; color: #567E96;'>$cat_description</a>\n";            
                  $category .= "$cat_desc \n";            
                }
                if($this->show_subcat) $category .= "<br>";
    I have assumed a field called $hosted_by. you will need to add the $hosted_by variable to the idx_category table and populate the field as needed.

    $hosted_by is a URL. if you want to use a name, you would create a $hosted_by_name field ( and maybe it would be $hosted_by_url instead of just $hosted_by ).

    the code I propose assumes you always have a cat desc and you always want to show it.

    I don't use the cat image, desc, subcats, etc so I can't test the above. but it looks like it should work. Kinda. Sorta. Maybe....

    Just some random thoughts on this.

    I love vB. I love vB. I love vB...
    Last edited by esm; 07-04-2003 at 06:42 AM.
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  11. #11
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

Similar Threads

  1. what does it mean ?
    By lewisw in forum v5.x
    Replies: 10
    Last Post: 08-29-2003, 02:05 AM
  2. category listing
    By stix in forum v3.2
    Replies: 3
    Last Post: 06-23-2003, 08:26 PM
  3. Replies: 0
    Last Post: 11-01-2002, 10:28 PM
  4. Replies: 1
    Last Post: 09-01-2002, 11:12 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
  •