Jump to content

bsmither

Member
  • Posts

    17,974
  • Joined

  • Last visited

  • Days Won

    603

Everything posted by bsmither

  1. Didn't work. Ended up with two copies of the document. I wonder what text() does...
  2. OK, I've examined the XTemplate class and made a cursory look through the parse() function. More importantly, I looked at the assign() function and now I see that this function is not making any text substitution when called, but rather using the placeholder as an index entry in an array and giving the text supplied as the value in the array at that index. Then it's all parsed. Which means, it's batched. That is, the illustrative code earlier would end up with: vars["VAR1"] = "Make{GLOBAL2}" vars["GLOBAL2"] = " {GLOBAL3} Day" vars["GLOBAL3"] = "My" and when parsed (I believe), would result in: outString = "Make{GLOBAL2} {GLOBAL3} DayMy" My next experiment is to run the outString through another iteration of assign() after the parse() function.
  3. Good info about what the parse() function is working on. Where is that function? The question I was really asking was, is the assign() function sequential or batched? That is (forgive the bad PHP coding): // Global variables persist across session var2 = " {GLOBAL3} Day"; var3 = "My"; // Local variables for this page only var1 = "Make{GLOBAL2}"; outString = "{VAR1}"; $outString->assign("VAR1",$var1) // So now outString should contain "Make{GLOBAL2}" // If I were to do this: $outString->assign("GLOBAL2",$var2); // $outString should now contain "Make {GLOBAL3} Day" // Next: $outString->assign("GLOBAL3",$var3); // I should have "Make My Day" But I don't when I worked on the following experiment. I put {VAL_LAST_NAME} in one of my site docs, then copied the code from the profile.inc.php that replaces {VAL_LAST_NAME} with the data from the database record. The {VAL_LAST_NAME} was still visible in the site doc. Assign() did not replace it. And I'm sure I coded it correctly. The question is, as seen in the code above, can these placeholders be 'nested'?
  4. I found in \includes\content\viewDoc.inc.php where the replacement process takes place. Now I need to figure out how to recurse $view_doc. Do I need to create a new XTemplate? How long does an XTemplate persist? I'm hoping ccUserData[x][y] is globally valid across all pages once logged in.
  5. I have in mind to use the profile data from the currently logged in shopper to send via querystring to a third-party feedback form. So, in the file \skins\-myskin-\styleTemplates\content\profile.tpl where the parser replaces {VAL_LAST_NAME} with the appropriate data from the currently logged-in visitor (for this particular session), can I also use this in a link in any of the Site Docs? When I think about it, it seems like it would not work, because a site doc is read out of a database record and is probably NOT parsed. Is there a owner/programmer-callable function call that will parse these placeholders? I know there are "Contact Us" mods available, but since I already have one, and I'm willing to experiment to transfer data in this manner, maybe someone can drop a few hints on where to get started.
  6. Are you willing to delete them? Copy the content to an archive somewhere, then in the Admin Panel, Site Docs, delete whichever docs you want to be removed from the Site Docs bar. The site docs are loaded from the database and are listed in (apparently) doc name order - that is, not in doc ID# order. Are you wanting to be able to display a site doc only if the visitor knows the precise URL for the doc? Or have a site doc only appear on the bar in only select pages? You can also google for "Show-Hide-Order Site Documents" and see what turns up.
  7. What I want is to join the two lines in the footer into one. Just playing idiot-mode for a second, there's bound to be member of my Board of Directors who will think that some visitors are going to assume my entire store's contents and descriptions are copyrighted by Devellion. So, I want: MyStore contents and descriptions copyright MyCompany. All rights reserved. Powered by CubeCart - Copyright Devellion Limited 2006. All rights reserved. By placing CubeCart's two lines into one, I'm hoping there will be less ambiguity as to what part of my store is copyrighted by Devellion.
×
×
  • Create New...