Results 1 to 14 of 14

Thread: Styling <%$category%>

  1. #1
    echo@'s Avatar
    echo@ is offline Active Member
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default Styling <%$category%>

    Hey nicecoder

    I need a hand trying to style <%$category%> layout, heres a picture of how my indexu shows the categorys.

    I would like to get accsess the html structure of <%$category%>.

    What i want to do is create a wrapper div then put the <%$category%> elements into divs also.

    I would like to put the category image into a div and float to the left etc etc

    I have looked in theme/mytheme/settings.php its the closest thing to stying <%$category%>

    Looked in category.class.php also. Im really stuck
    Attached Images Attached Images
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  2. #2
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    It's all in category.class.php

    line 423
    $category .= "<table width=\"$this->cat_table_width\" cellspacing=\"$this->cat_cellspacing\">\n";

    Details the table opening

    line 433
    $category .= "<td width=\"$width" . "%\" valign=\"top\">\n";

    Details the table data

    line 500
    <b><a href=\"$cat_url\" style=\"$this->cat_link_style\" name=\"cat_$cat_id\">$cat_name</a></b> $html_number_of_links \n

    That details the category text and as you know from a previous question, displays the number of links.

    You have to search for it, it's all broken up because of the code in between the lines.

  3. #3
    echo@'s Avatar
    echo@ is offline Active Member
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    No probs , i really appreciate this.

    I have been looking arrond the file but like you say its all everywhere.

    Can you style within the php file ??

    Thanks
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  4. #4
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Of course you can, since it's all placed within index.html it should pull the css as well.

    As a note, it works this way in 5.x and earlier as well.

  5. #5
    echo@'s Avatar
    echo@ is offline Active Member
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    Just another one


    What does the \n" stand for
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  6. #6
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    \n = new line

  7. #7
    echo@'s Avatar
    echo@ is offline Active Member
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    When I put a div arround the image line 463 and set a class for the div i get

    PHP Code:
    Parse error:  syntax errorunexpected T_STRING in /home/bathroom/public_html/lib/category.class.php on line 463 

    This happens even if I style the element directly,


    im going to bed , ill have poke arround with it tomorrow
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  8. #8
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    You'd have to paste the code here for me to know anything.

  9. #9
    echo@'s Avatar
    echo@ is offline Active Member
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    cool


    line 463

    was
    PHP Code:
    $image "<img src=\"$cat_image\" border=\"0\" alt=\"\" />"
    now

    PHP Code:
     $image "<img src=\"$cat_image\" class="lib-image" border=\"0\" alt=\"\" />"
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  10. #10
    esm's Avatar
    esm
    esm is offline Active Member
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by echo@ View Post
    cool


    line 463

    was
    $image = "<img src=\"$cat_image\" border=\"0\" alt=\"\" />";[/PHP]

    now

    $image = "<img src=\"$cat_image\" class=\"lib-image\" border=\"0\" alt=\"\" />";

    .
    you have to "escape" double quote marks that are inside of double quote marks.

    just out of curiosity, what does your lib-image class look like?


    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  11. #11
    echo@'s Avatar
    echo@ is offline Active Member
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    I havent created one yet, it was late last night and i wanted to prep some work for today,

    ESM where have you been all my life

    We've missed you man!!
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  12. #12
    esm's Avatar
    esm
    esm is offline Active Member
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by echo@ View Post
    I havent created one yet, it was late last night and i wanted to prep some work for today,

    ESM where have you been all my life

    We've missed you man!!
    I just decided to take my own advice and work on stuff during my spare time that actually make money or provide me with fun.

    Usually, I don't even bother to open new/updated threads. Every once in a while I "rollover" the thread but even then few arouse my interest. And long-winded threads are an exercise in futility.

    In all honesty INDEXU has become very complicated. So much so that I don't understand a lot the new stuff. And I have no desire to learn it. Even the old stuff is obscured by the new stuff.

    And even after all the new stuff that has been added, it still lacks a couple of basic features for a sucessful links directory program.

    Anyway, back in my college days I did a paper on "how to predict US presidential elections." For our election on this past Tuesday, I predicted Obama 367 - McCain 171 with an eight point percentage difference.

    I came close to the actual: Obama 364 - McCain 174 ( I missed Montana ) with an seven point percentage difference ( I guess some of the young college kids just couln't get out of bed that day ).


    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  13. #13
    Bruceper is offline Active Member
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Code below is correct, you must have a \ before each and every "

    $image = "<img src=\"$cat_image\" class=\"lib-image\" border=\"0\" alt=\"\" />";

  14. #14
    echo@'s Avatar
    echo@ is offline Active Member
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    Just wanted to say thanks for your help, worked like a charm
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



Similar Threads

  1. randomly retriving a category from <%$category%>
    By echo@ in forum Blocks and Modification
    Replies: 13
    Last Post: 03-27-2008, 12:21 AM
  2. Replies: 2
    Last Post: 01-02-2008, 08:25 AM
  3. Replies: 6
    Last Post: 06-02-2005, 10:08 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
  •