#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2016
    Posts
    6
    Rep Power
    0

    Need help puting toplist on page


    Im using a toplist and every time I try to include
    PHP Code:
    <?php
      
    include "./trade/toplist/top.html";
    ?>
    it messes up my page. Can some one help me figure out where to include it. I can figure out a way to repay you. With traffic or maybe money.

    I have a bunch of categorys like this
    Code:
    <div class="column-container">
      <div class="box" id="sites">
        Mature Porn Premium Sites
      </div>
      <div class="content" style="max-height: 140px;">
        <ul>
          <li><img src="http://www.google.co...avicons?domain="><a href="" target="_blank" rel="nofollow"></a></li>
          <li><a href="/trade/signup.php" target="_blank" rel="nofollow">Add your Site!</a></li>
        </ul>
      </div>
    </div>
    css
    Code:
    .column-container {
      width: 220px;
      border: 1px solid #196bb3;
      border-bottom-right-radius: 0;
      background: white;
      box-shadow: 0px 0px 1px 2px rgba(68, 158, 219, 0.2);
      margin-bottom: 15px;
      margin-right: 15px;
      text-align: left;
    }
    If i could get some one to on skype or icq that would be of great help.


    Im trying to get the toplist in the box
    Last edited by Triple_Nothing; August 3rd, 2016 at 07:25 AM.
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2009
    Location
    Hartford, WI
    Posts
    1,569
    Rep Power
    131
    I edited your post to include CODE/SCRIPT tags around such. Please do so on future posts.

    As far as your issue, other than the images simply displaying 1 with a scroll and the other without, all you've told us is "My script doesn't work." You're going to have to provide more detail as to what is/isn't happening, and what is intended to be.

    Totally guessing here, but if "trying to get the toplist in the box" means that you don't want the list displayed below its header like it currently is, but rather in its place, than it's simply repositioning your code.
    Last edited by Triple_Nothing; August 3rd, 2016 at 07:27 AM.
    He who knows not that he knows not is a fool, ignore him. He who knows that he knows not is ignorant, teach him. He who knows not that he knows is asleep, awaken him. He who knows that he knows is a leader, follow him.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2016
    Posts
    6
    Rep Power
    0
    Right now I have no top list on the site its just links. The toplist should be set up ok in the trade script. I can get it to show on the page.
    I want the toplist In the box where I highlighted in the pic. But when ever I try and include that php. It messed up the formating of my page. All the boxes combined to one.
  6. #4
  7. No Profile Picture
    Super Moderator
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2009
    Location
    Hartford, WI
    Posts
    1,569
    Rep Power
    131
    Ok. Well, from what you've told me, all I can tell you is to change that one thing, adjust the other, and possibly move that 1 item to the other line.

    I appreciate any coding you have provided in the OP, but from what that defines, there is nothing wrong. We are going to need, perhaps, some before/after of the coding itself.
    He who knows not that he knows not is a fool, ignore him. He who knows that he knows not is ignorant, teach him. He who knows not that he knows is asleep, awaken him. He who knows that he knows is a leader, follow him.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2016
    Posts
    6
    Rep Power
    0
    The php code needs to be include in my html for the toplist to show. Could i contact you with skype.

    The page is a bunch of these category boxes. I dont know if this will help any more but here more code
    Code:
    <body>
    <div id="wrapper">
    <div id="container">
    
    <div id="logo">
    
    <div id="logo-left">
    <img src="/files/j.png">
    </div>
    
    <div id="logo-right">
    <img src="/files/p.jpg">
    </div>
    
     <h6> Hu
    </h6>
    
    </div>
    
    <div id="main">
    <div class="column-container">
    <div class="box-top" id="-sites">
     Sites</div>
    <div class="content" style="max-height: 270px;">
    <ul>
    
    </ul>
    </div>
    </div>
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2016
    Posts
    6
    Rep Power
    0
    where would you put the php code. in my html
  12. #7
  13. No Profile Picture
    Super Moderator
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2009
    Location
    Hartford, WI
    Posts
    1,569
    Rep Power
    131
    Well, for 1, PHP doesn't exist as anything more than text in an HTML document. I have a feeling you are trying to build individual modules for your page, and attach them in the end. This is just fine. As far as your placement of your include(), is this at the beginning of your document like many instructions out there define? If so, this is where you're going wrong. Don't hold me to the word, but here is the general idea of placement:

    Libraries, functions, and similar files that take no direct action get placed in the header.
    Items that need to wait for the content to load are placed in the footer, or within .onLoad()

    In reference to PHP, an include may land anywhere within the file, depending on how you intend to place.
    If the file's content is to provide direct output, then it should be placed right where it is to exist.
    If it is to build items based on other items, and maybe located dynamically, the page structure should hold a DIV or such define for this content to be placed in, wherever that shall be.

    Here's an example of my general index.php based on a rather static directory structure.
    PHP Code:
    <?php
      session_start
    ();
      
    $get_loc = (!isset($_GET['loc']) ? "main" $_GET['loc']);
      
    $loc file_exists('./inc/' $get_loc '.php') ? $get_loc 'nopage';
      include(
    './inc/db.php');
      include(
    './inc/header.php');
      include(
    './inc/' $loc '.php');
      include(
    './inc/footer.php');
    ?>
    I know yours isn't to this extent, but I'm guessing you've the same idea, so if you want the list to land between this and that, place your include between this and that.
    He who knows not that he knows not is a fool, ignore him. He who knows that he knows not is ignorant, teach him. He who knows not that he knows is asleep, awaken him. He who knows that he knows is a leader, follow him.
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2016
    Posts
    6
    Rep Power
    0
    Alot of this is new to me im still trying to learn. Here is my site

    f - Pastebin.com listed here. Its adult content. If thats a problem.

    I thought I could just use that php where I wanted and it would show up there. But im doing something wrong..
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2016
    Posts
    6
    Rep Power
    0
    Well I was trying to post a link to the site that expired in 24 hours. But likes it wont be approved. Im new to coding and still trying to learn. Theres no other php thats need
    to be4 placed in footer or header. I was placeing the php in <div class="column-container"> in different spots. It would end up combining my whole webpage. Into that one box.
  18. #10
  19. Headless Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,977
    Rep Power
    9647
    Originally Posted by staphibuna
    Well I was trying to post a link to the site that expired in 24 hours. But likes it wont be approved.
    Our anti-spam system was keeping your posts hidden for a moderator to manually approve. It does that for new accounts without many posts. It's very effective but sometimes it catches legitimate posts too.
    I approved your post so it's visible now.

    Comments on this post

    • Will-O-The-Wisp agrees : Thank you!

IMN logo majestic logo threadwatch logo seochat tools logo