Jump to content

AndyB

Staff Alumni
  • Posts

    5,465
  • Joined

  • Last visited

    Never

Posts posted by AndyB

  1. Long time away, so apologies in advance if this is posted in the wrong place, question is too vague, etc.  It'll take a while to get in the swing of things ...

     

    I am working on a site using a CMSmadesimple.  I would like to have an image in the sidebar (part of the main template file) which is the same image for each page within the same 'parent' group of menu options, i.e. the image is representative of the group of sub-menu options.  I will have a different image for each other group of menu options.

     

    Looking at the template_vars, it appears that 'position' is the variable I need, but I can't figure out how to abstract it and use it in a bit of script to display the correct image.  Unfortunately, the Smarty documentation is not as idiot-friendly as I need to help myself.

     

    All suggestions appreciated.

     

     

     

     

  2. If the generated html works in browser x then it'll work in any browser. It may not necessarily perform the way you expect but I can't believe browser x works and browser y produces a white page.

     

    The concept of "doesn't work" is too vague to suggest any fixes.

     

    If it works without your login script and produces a 'white page' with your login script then your login script is the problem.  And until you turn on error display and error reporting, you're never going to solve the problem.

  3. The whole white page thing makes no sense.  Make sure that you have error_reporting turned on and error_display turned on for all of your pages and then act to fix the error messages that get displayed.  Without knowing what the errors are, neither you nor we could ever guess what the problem is. If error_reporting is on and error_display is on and you still get a 'white page', it's because the script executed perfectly (according to any conditional logic you had) and there were no lines that generated output ... unless you're using the same colour for text as the background.

     

    A page that craps out then works when you force a refresh is symptomatic of a whole different family of problems.

  4. Perhaps I wasn't clear about that.

     

    While the first seven days of October 2008 do begin at 2008-10-01, conventional thinking is that the first week of October actually begins on Monday October 6.

     

    Before anyone dashes off some code ... and a few minutes reviewing how the date() function works would help ... you need to define clearly what you really want.

  5.    $db_connect = mysql_connect( $hostname , $username, $password) or die ("Unable to connect to database");
       
       mysql_select_db( "sharingi_music" , $db_connect);

     

    That looks illogical. At the second of those lines, $dbconnect will be either true or false. And what I'd expect to work is:

     

    mysql_select_db( "sharingi_music");// assuming that's the db name

  6. MM -DD-YYYY

     

    in the databse, and upon registration - the format is MM DD YYYY

     

    OK, last attempt. It's your database and presumably you can view what's in it, not guess.  Notice that you've clearly told us what format you're using for date.  Notice that you've given us two different answers to that question. So, take a deep breath, take a careful look and tell us without reservation which it is - and please note that MM -DD-YYYY is not the same as MM-DD-YYYY.

     

    In case it isn't obvious yet, the best date format to use in your database is the MySQL date type - it uses the ISO standard (and absolutely unambiguous) YYYY-MM-DD form. You can easily perform all sorts of manipulations very simply once you have a real date in a real format. Just because the database format is different from how you might want to display dates should not affect your choice of a standard date field.

     

    Perhaps it is like thaty format upon registration and database and perhaps it somehow changes whilst the file is being executed?

     

    Extraordinarily unlikely.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.