3 php questions

Discussion in 'PHP' started by php_coder, Jun 9, 2008.

  1. #1
    hello,

    1)

    i want to ask about the idea of the online update for script

    which includes search for update,install update automaticly

    2)

    if i want to edit tpl template files through cp with out opening every file through FTP , must the tpl files have 777 permission?

    3)

    im coding a new version of my cms and i want to add blocks system

    should i put block code into php file and put it in a folder for example blocks

    and then call the file by including it?

    thankyou:D
     
    php_coder, Jun 9, 2008 IP
  2. php_coder

    php_coder Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    anyhelp please?
     
    php_coder, Jun 9, 2008 IP
  3. lfhost

    lfhost Peon

    Messages:
    232
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    1, Dont understand the question.
    2, Yes.
    3, What is a blocks system ? By the sounds of it you want to put a list of functions inside of a file called block.php and then use an include/require to initialise the use of those functions. If so, that is correct. The file would need to be included before you actually use said function inside the file.
     
    lfhost, Jun 9, 2008 IP
  4. php_coder

    php_coder Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    php_coder, Jun 10, 2008 IP
  5. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #5
    online update will be difficult, except if you have updates for every version. Updating isn't easy at all, but doingable!
     
    EricBruggema, Jun 10, 2008 IP
  6. php_coder

    php_coder Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    eric why its difficult?

    suppose i have update

    how could i do something like that?
     
    php_coder, Jun 10, 2008 IP
  7. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #7
    you need to do a couple of things,

    1 first check the existing files that you would to change (MD5 compare)
    2 then overwrite existing files with new content
    3 verify that everything is ok!

    Lots of users nowerdays will alter there code so updating stuff like this isn't handy anymore! just release a new version and let users upgrade them selves!
     
    EricBruggema, Jun 10, 2008 IP