User Profile

Collapse

Profile Sidebar

Collapse
seegoon
seegoon
Last Activity: Dec 29 '18, 01:00 PM
Joined: Oct 29 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How can I generate an include with a random number inside it?

    I want to include divs for promotions, adverts, random site content and so on. The method I'd thought of is this: include them using random numbers. So I'd eventually want to generate something like:
    Code:
    include("promo-column/promo-1.php")
    where the 1 could be between two set numbers, randomly chosen on page load. I understand how to generate a random number (i.e.
    Code:
    echo 'whatever-', rand(1, 5);
    but I don't know the syntax to have that happen...
    See more | Go to post

  • Actually guys, don't worry. I've solved it. Just added an empty div with the property clear:both and a height attribute. My footer's an include, so it works across the entire site. It would've been nice to have solved it using pure css and no extra elements, but such is life.
    See more | Go to post

    Leave a comment:


  • seegoon
    replied to How to create Excel Sheet in HTML
    From Excel, you can export a worksheet as HTML. Go to File > Save as web page. This is present on my version, 2008 for Mac. I can't say whether it'll be available for whatever version you use.
    See more | Go to post

    Leave a comment:


  • Problem with display:inline-block footer following a float:right div

    Hi guys.

    I have a footer set to display:inline-block so that it'll shrink to fit its contents. It works fine when it follows other block or inline elements, it seems. However, when it follows a div set to float:right, it aligns to the left of that div. Here's the relevant css:

    Code:
    #footer {
    	clear:both;
    	padding:0 20px 13px;
    	background-color:transparent;
    	border-width:18px 22px 0 20px;
    ...
    See more | Go to post

  • seegoon
    replied to Problem using includes in subdirectories
    in PHP
    I found a solution; I don't know if it's the most elegant out there, but it sure seems to work.

    Altering the php.ini in my root directory (in my case, php5.ini) and adding the following line:
    Code:
    include_path=".:/includes"
    I guess it won't work for everyone, but it means that I only have to write the following line, on any page, to call an include:

    Code:
    <?php include("include.php");
    ...
    See more | Go to post

    Leave a comment:


  • seegoon
    replied to Problem using includes in subdirectories
    in PHP
    Oh, and this might complicate things a bit: I'm using a testing site to develop this site. Its domain is test.mysite.com , but all the files actually reside in mysite.com/test. Can I just perform any changes in the /test/ subdir, and once I want to go live, transfer to the main site?

    Sorry to make things more difficult!
    See more | Go to post

    Leave a comment:


  • seegoon
    replied to Problem using includes in subdirectories
    in PHP
    Sorry, this really is a newb question - but what do you mean by 'index file'? Do you mean www.mysite.com/index.php?
    See more | Go to post

    Leave a comment:


  • seegoon
    started a topic Problem using includes in subdirectories
    in PHP

    Problem using includes in subdirectories

    This must be a really basic problem for almost every site out there.

    How can I get includes to work for subdirectories (i.e. mysite.com/subdirectory/file.php) when all of my includes are stored in a /includes folder off the root directory? I've been Googling and have come across dozens of cryptic solutions.

    It would be great if it was a .htaccess thing, because I can foresee that being the simplest way. That way, you...
    See more | Go to post

  • Whoa. Thanks guys. That's worked absolutely immaculately, Markus. Alti, I'm curious - what are the advantages to your technique?

    Once this is implemented into the site I'm butchering, I'll PM you a link so you can see your hard work in action!
    See more | Go to post

    Leave a comment:


  • Okay, smartypants. Let's see if there's an easy answer to stage two.

    I'd like a fallback for pages without $thisPage even being on the page. In this instance, I'd like to echo something like "flower-(rand(1, 10))". I know that syntax is way off base, but hopefully what I'm asking for makes sense; that I have 10 "flower" classes and the rand function chooses a number to fill it in.

    This is kind of...
    See more | Go to post

    Leave a comment:


  • Thank you. That has worked a charm and I've learned something I should've known before.
    See more | Go to post

    Leave a comment:


  • Newb problem: "if" statement returning multiple results as true

    Hi guys.

    I'm trying to write some php so that, depending on the page displayed, a certain <div> will load a certain class, giving it a certain background image. I have it down in theory, but there's a problem. My current code is returning multiple results as true, leading to the user receiving source like:
    Code:
    <div id="wrap" class="flower-1flower-2">
    In this instance, it is obviously...
    See more | Go to post

  • seegoon
    replied to Problem using include() in subdirectories
    in PHP
    Wow - there's certainly a lot more for me to learn before I can go messing around with code like this. For the time being, I've just told it to track backwards, using ../ in the address. I just need to spend a bit more time reading up on my basics; I only started thinking about using it yesterday. There will be plenty of roadbumps along the way. Thanks for your answers anyway, though!
    See more | Go to post

    Leave a comment:


  • seegoon
    replied to Favicon image issue !
    Try changing "shortcut icon" to just "icon" - that's what I have on my site and it seems to be working okay.
    See more | Go to post

    Leave a comment:


  • seegoon
    started a topic Problem using include() in subdirectories
    in PHP

    Problem using include() in subdirectories

    Hi there. You guys are going to save my life.

    I've recently started changing a site from plain ol' html to php, so that I can use includes for headers, footers and so on, and also so that in the future dynamically creating pages won't be a problem.

    I have includes working a-okay at the moment for files in the root directory, i.e. in http://buddingpress.co.uk/sitemap.php I have three functional includes, all basically...
    See more | Go to post

  • seegoon
    replied to Why aren't these links functional in IE?
    Thanks for this. I should really spend some time learning the basics before lunging headfirst into a project and learning as I go.



    Everyone I've talked to about this has said to me "oh, what software are you using?", which surprises me. Learning from scratch, I've never seen any recommendations that I should go and buy any kind of web design program at all. In fact, it looks to be looked down upon.

    ...
    See more | Go to post

    Leave a comment:


  • seegoon
    replied to Why aren't these links functional in IE?
    The final solution seems to have worked perfectly, thanks for that. It seems obvious now! Would I have been able to style the <a> tags? The <div>s use background-image to get the desired effect. No matter how you look at it, I completely bodged it together so it working at all is a miracle!

    Any ideas about the positioning of the pop-up? Not that you haven't already saved my ass today.

    Thanks.
    See more | Go to post

    Leave a comment:


  • It's highly counter-intuitive, but you could contain the columns vertically, instead of horizontally, so that you have three container divs. The problem with that is that although the reading order would be div 1, div 2, 3, 4, 5, 6, the order in the html would be 1, 4, 2, 5, 3, 6. So perhaps JS is a better idea.
    See more | Go to post

    Leave a comment:


  • The answer you're going to get from literally everyone here is that your approach is out-dated and that using slices is highly inadvisable, for just the reason you just explained. One tiny slip and the whole house of cards comes tumbling down. It would save you many, many hours of future headaches to learn some basic HTML and CSS and to work from there.
    See more | Go to post

    Leave a comment:


  • seegoon
    started a topic Why aren't these links functional in IE?

    Why aren't these links functional in IE?

    Hi guys.

    I'm completely new to web design and development, but have been tasked with creating a passable website for a new venture. I've done the whole thing by hand, which might have been a bit foolhardy. The result is a website that looks okay on the system I'm using, but is pretty temperamental with lower resolutions and the sinful IE.

    There's a page - http://buddingpress.co.uk/publish - which has some coloured banners....
    See more | Go to post
No activity results to display
Show More
Working...