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? [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => glockops [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> Template Headaches (PHP includes & links gettingrewritten) - Macromedia Contribute General Discussion

Template Headaches (PHP includes & links gettingrewritten) - Macromedia Contribute General Discussion

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/breadcrumb.inc.php'); ?> Code after the draft is published will be: <?php include('../../home/smwc/public_html/includes/breadcrumb.inc.php'); ?> Obviously, that breaks ...

  1. #1

    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/breadcrumb.inc.php'); ?>
    Code after the draft is published will be:
    <?php include('../../home/smwc/public_html/includes/breadcrumb.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?

    glockops Guest

  2. #2

    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['DOENT_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!!!

    glockops Guest

  3. #3

    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: "Doent relative paths pointing to items located in the Templates
    folders are rewritten in new pages created from templates"
    [url]http://kb.adobe.com/selfservice/viewContent.do?externalId=52195a7[/url]

    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

    Connor Doyle Guest

  4. #4

    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....

    xjpattx Guest

  5. #5

    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?

    jcroentgen Guest

  6. #6

    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.


    glockops2 Guest

  7. #7

    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.

    xjpattx Guest

Similar Threads

  1. DataGrid Headaches
    By TheFlexMan in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: April 30th, 01:32 PM
  2. ASP.Net Extension Headaches
    By BillRogers in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: May 8th, 05:23 PM
  3. AutoLoader/inheritance headaches
    By Jordan Hiller in forum PERL Modules
    Replies: 3
    Last Post: December 6th, 03:33 AM
  4. Template does'nt have correct links after update in Fireworks
    By WI3Z webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 2
    Last Post: July 28th, 10:21 PM
  5. ?Hard links, Soft links, & Aliases--Explain
    By Fred Moore in forum Mac Applications & Software
    Replies: 5
    Last Post: July 2nd, 02:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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