Adobe Dreamweaver Forums



Last 10 THreads :         403 error from my domain? (Last Post : Ken Ford - *ACE* - Replies : 1 - Views : 4 )           »          Adding database RDS Login Dreamweaver 8 Coldfusion 8 (Last Post : ClubbyJMC2008 - Replies : 4 - Views : 5 )           »          Looping from end of clip to middle of clip (Last Post : Gibbah - Replies : 1 - Views : 5 )           »          Help need div to expand to height of browser (Last Post : Tim G - Replies : 1 - Views : 2 )           »          how do I add a table to a preformed template that I got? (Last Post : mb007inc - Replies : 0 - Views : 1 )           »          Downloading from Flash (Last Post : NedWebs - Replies : 1 - Views : 2 )           »          Checking which button is clicked (Last Post : NedWebs - Replies : 3 - Views : 4 )           »          Trouble with SQL Query Tool on Leopard (Last Post : pdenlinger - Replies : 6 - Views : 7 )           »          Fireworks CS3 or CS4 and Vista 64 bit O.S. (Last Post : Alex Marino - Replies : 1 - Views : 2 )           »          Spry Accordion (Last Post : Ken Ford - *ACE* - Replies : 3 - Views : 8 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Contribute
 
Tags: , , , , ,



Reply
  #1 (permalink)  
Old 07-07-2008, 07:59 PM
glockops
 
Posts: n/a
Diggs:
Default Template Headaches (PHP includes & links gettingrewritten)

I know this has been discussed a few times on these forums, but I've yet to
find a solution.
I have several DW Templates that make use of PHP includes - some are relative
('includes/navigation.inc.php') some are absolute paths
('/home/smwc/public_html/includes/footer.inc.php') . Whenever a Contribute user
saves a draft or sends a page for review these includes (which are OUTSIDE an
editable region) get rewritten into relative paths.
For example:
The draft will get saved in domain.com/MMWIP/randomstring/randomstring.php
Code before the draft is saved will be:
<?php include('/home/smwc/public_html/includes/breadcrum b.inc.php'); ?>
Code after the draft is published will be:
<?php include('../../home/smwc/public_html/includes/brea dcrumb.inc.php'); ?>
Obviously, that breaks everything.

It is also doing this to all absolute paths. Stylesheets go from
src="/scripts/css/style.css" to src="../../scripts/css/style.css"; even the
Template line gets changed to this <!-- InstanceBegin
template="../../Templates/Index-Page.dwt.php" codeOutsideHTMLIsLocked="false"
-->

Path links defined in the template (/about/index.php) get changed to
.../about/index.php and so on..
I was a few weeks from a website launch... * sobs *
Can anyone help with this?



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-07-2008, 09:16 PM
glockops
 
Posts: n/a
Diggs:
Default Re: Template Headaches (PHP includes & links gettingrewritten)

OK, so I've worked on this for a little longer, and here is what I've found.
You apparently cannot use php includes like the one below
<?php include('/home/smwc/public_html/someinclude.php'); ?>
where you include a file from the server's root path.
You can however, use an include like the one below (which does the same thing)
<?php include($_SERVER['DOCUMENT_ROOT'].'someinclude.php'); ?>

I am however, still having a problem with referencing images, stylesheets, and
links that start at the domain's root - example -- /index.php
Contribute still turns a link (to anything) that starts with a ' / ' into a
relative path; resulting in ../../index.php

I really didn't want to specify a domain for the resource, because we will
soon be changing domain names (parallel development server) - but it looks like
I'm going to have to anyway...

Why can't Contribute just leave links starting with a forward slash alone!!!

Reply With Quote
  #3 (permalink)  
Old 07-20-2008, 04:26 PM
Connor Doyle
 
Posts: n/a
Diggs:
Default Re: Template Headaches (PHP includes & links gettingrewritten)

glockops:

I am finishing up my first deployment of Adobe Contribute CMS for one of my
clients, and I was having the same problem with PHP require(). I found the
following article on the Adobe KB that contains our solution:

Article: "Document relative paths pointing to items located in the Templates
folders are rewritten in new pages created from templates"
http://kb.adobe.com/selfservice/view...rnalId=52195a7

In the .dwt, you must surround the paths in question with a proprietary syntax
which causes them to be treated as literals instead of Template Parameters,
like so:

<?php include("foo.php"); ?>

becomes:

<?php include("@@('foo.php')@@"); ?>

This technique also works for any other type of relative paths to external
resources such as images, scripts, stylesheets, etc.
All the best,
--
Connor Doyle
One Orange Software

Reply With Quote


  #4 (permalink)  
Old 07-21-2008, 08:14 PM
xjpattx
 
Posts: n/a
Diggs:
Default Re: Template Headaches (PHP includes & links gettingrewritten)

My main concern is with seeing all these complaints about this cms program why
not just switch to another? It seems like alot of people are having problems
with it...not to take away from contribute because i tried it out but had many
problems as well....

Reply With Quote
  #5 (permalink)  
Old 07-21-2008, 10:07 PM
jcroentgen
 
Posts: n/a
Diggs:
Default Re: Template Headaches (PHP includes & links gettingrewritten)

<<My main concern is with seeing all these complaints about this cms program
why not just switch to another? It seems like alot of people are having
problems with it...not to take away from contribute because i tried it out but
had many problems as well....>>

And what program would you suggest for a Mac platform?

Reply With Quote
  #6 (permalink)  
Old 07-21-2008, 10:07 PM
glockops2
 
Posts: n/a
Diggs:
Default Re: Template Headaches (PHP includes & links gettingrewritten)

[q]Originally posted by: xjpattx
My main concern is with seeing all these complaints about this cms program why
not just switch to another? It seems like alot of people are having problems
with it...not to take away from contribute because i tried it out but had many
problems as well....[/q]

Yeah, I didn't mean to sound tiffy... Contribute is working out rather well.
It's really simple for end-users to understand so that makes my job a lot
easier. And it's better than anything else that I've found so far. It just
does its occasional weird thing - I'll live with that if the rest of it works.

Thank you Connor! I'm sure that will come in handy!

FYI - couldn't use my original account so glockops2 it is.


Reply With Quote


  #7 (permalink)  
Old 07-22-2008, 03:02 PM
xjpattx
 
Posts: n/a
Diggs:
Default Re: Template Headaches (PHP includes & links gettingrewritten)

well wit me i just create my site in photoshop....send it to dreamweaver ...and
then i have a cms that i have that makes it real easy to make it to a website
....( i don't want to say what cms because it's not like i'm trying to advertise
for them or anything) but yea it's real easy to do that ...some companies out
there that do that is like reddot, interwoven, contentivity, and lots more just
go on google or something and type cms and you'll get alot ....like i said i
tried contribute but wasn't very satisfied with the outcome of the product but
try, especially if your with a bigger company working on their website, another
cms.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 01:24 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk