Editing PHP variables

Ask a Question related to Macromedia Contribute General Discussion, Design and Development.

  1. #1

    Default Editing PHP variables

    Hi,

    I have a number of page titles and breadcrumb links which share the same text
    on my site

    1. Can I use a shared PHP variable in an include file like $support = "sources
    of support"; and allow this variable to be editable by a Contribute user, how
    would I do this?

    2. I have used includes for each breadcrumb trail link, can users edit these
    in Contribute if I name them with the file extension .inc.php. How could I get
    a Contribute user to create their own include and add it to the breadcrumb
    trail?

    Thanks
    Steve


    Steve84 Guest

  2. Similar Questions and Discussions

    1. #39833 [NEW]: Session variables overwritten by local variables (register_globals=off)
      From: sup1382 at accedo dot es Operating system: OpenBSD 3.9 PHP version: 5.2.0 PHP Bug Type: Session related Bug...
    2. editing text using advance editing feature
      I created 11 PDFs in InDesign for my client. She wants to be able to change the headlines on the PDFs using Acrobat editing features. I never...
    3. #39447 [NEW]: Want to optionally handle apc_upload_progress variables using session variables
      From: krudtaa at yahoo dot com Operating system: All PHP version: 5.2.0 PHP Bug Type: Feature/Change Request Bug...
    4. Users editing PHP variables or scripts
      Hi, I have a PHP template that contains an include for a page header but this script requires three variables that are pass to the header.php page...
    5. Replacing code based on static variables to variable variables.
      Can anyone give me some help or tips in converting this code to take 2 variables that will specify the number of Pack type lines and the number of...
  3. #2

    Default Re: Editing PHP variables

    >> Can I use a shared PHP variable in an include file like $support = "sources
    of support"; and allow this variable to be editable by a Contribute user, how
    would I do this?

    Contribute doesn't allow end users to edit code/scripts of any kind. It was
    meant to be used by non-techical/programmer users. However, if you create a
    plain text/html file and place a link inside of it, then a Contribute user
    *would* be able to edit that.
    >> I have used includes for each breadcrumb trail link, can users edit these
    in Contribute if I name them with the file extension .inc.php. How could I get
    a Contribute user to create their own include and add it to the breadcrumb
    trail?

    If the include will only contain HTML code (for the end user to edit) then it
    can be named .html or .htm or whatever. It only needs to be named .php if it
    contains PHP code. (Btw, you should never make a file with server side code
    named ".inc", since .inc allows outside users to view your dynamic scripting. )

    So if you have something like:

    <span class="bcrumbs">
    <?php include(/home/breadcrumbs/index.html); ?> &raquo; <?php
    include(/home/breadcrumbs/aboutus.html); ?> &raquo; <?php
    include(/home/breadcrumbs/companyhistory.html); ?>
    </span>

    Then the end user should be able to go inside your "aboutus.html" include and
    edit the HTML link inside of it. And it will change that breadcrumb link,
    whenever its used, globally.

    Using this method, they can edit includes, and create them, but they can't
    write their own PHP code. So you, as the admin will have to handle that part. I
    would recommend that you place a limit upon how many levels deep their
    files/foldeers would go. I once worked on a web site that had over 6,000 pages!
    And we made it a standard that our breadcrumbs would not go any deeper than 4
    folders down. You may as well do the same.

    mzanime.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139