Ask a Question related to Macromedia Contribute General Discussion, Design and Development.
-
Steve84 #1
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
-
#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... -
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... -
#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... -
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... -
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... -
mzanime.com #2
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.
in Contribute if I name them with the file extension .inc.php. How could I get>> I have used includes for each breadcrumb trail link, can users edit these
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); ?> » <?php
include(/home/breadcrumbs/aboutus.html); ?> » <?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



Reply With Quote

