However, it has been significantly improved upon and extended in [DO NOT CIRCUMVENT THE WORD FILTER]2 in the Unofficial Mods forum... take a peek if you get a chance.
[Modification] Document Content Variables
#81 Guest_rthrash_*
Posted 10 March 2005 - 04:40 PM
However, it has been significantly improved upon and extended in [DO NOT CIRCUMVENT THE WORD FILTER]2 in the Unofficial Mods forum... take a peek if you get a chance.
#82
Posted 11 March 2005 - 03:04 AM
iamrick, on Mar 10 2005, 12:18 PM, said:
Any idea why this is happening?
Also does it have anything to do with why the images are not showing up correctly to the left of it? You'll notice etomite is not pushing [*alias*] out correctly.
Cheers
well... I'm still around but don't use Etomite quite as much. My current projects require intense user management and logic that really goes beyond Etomite capabilities. But I still love Etomite when I need a pure content-only CMS.
What is the "Array" content variable type? In other words, what data type have you selected when you created the variable? It seems to be unique from the other docvars so I would be interested in knowing how it is different.
I didn't see [*alias*]. Is this something that has already been fixed?
Thanks,
JG
#83
Posted 14 March 2005 - 12:31 AM
apodigm, on Mar 11 2005, 01:04 PM, said:
What is the "Array" content variable type? In other words, what data type have you selected when you created the variable? It seems to be unique from the other docvars so I would be interested in knowing how it is different.
I didn't see [*alias*]. Is this something that has already been fixed?
Thanks,
JG
Oh... I didn't realise it wasn't supported anymore
Bank Spillover||Ground Cover||Hanging Baskets||Hedging||Pergolas||Pots & Tubs||Topiary||Screening etc.
#84
Posted 14 March 2005 - 01:29 AM
iamrick, on Mar 14 2005, 06:31 AM, said:
Bank Spillover||Ground Cover||Hanging Baskets||Hedging||Pergolas||Pots & Tubs||Topiary||Screening etc.
iamrick,
If you wouldn't mind, I think I would need to log into your Etomite manager. You can PM me or send an email to web_at_apodigm.com
#85
Posted 12 May 2005 - 04:56 AM
Does anyone here have a live example page of where the docvars was utilized and in which part of the page?
Just curious. I'd like to include something like this in the future on a project I'm doing but I don't want to get in over my head before I decide it's worth my while.
Thanks!
#86
Posted 12 May 2005 - 05:24 AM
bwoodsdesign, on May 12 2005, 01:56 AM, said:
Does anyone here have a live example page of where the docvars was utilized and in which part of the page?
Just curious. I'd like to include something like this in the future on a project I'm doing but I don't want to get in over my head before I decide it's worth my while.
Thanks!
#87
Posted 29 June 2005 - 01:59 PM
using DocVars, can i create [*left-content*] and [*right-content*] placeholders (for example) that can be put in the template, and have different documents be attached to either of those document variables?
again, based on what i've read i would like to think DocVars (or maybe the MOD-x2 that was mentioned in the previous post) can do this, but not 100% sure.
any tips, tricks, and implementation suggestions are greatly appreciated!
#88
Posted 29 June 2005 - 02:07 PM
digitalmouse, on Jun 29 2005, 10:59 AM, said:
using DocVars, can i create [*left-content*] and [*right-content*] placeholders (for example) that can be put in the template, and have different documents be attached to either of those document variables?
again, based on what i've read i would like to think DocVars (or maybe the MOD-x2 that was mentioned in the previous post) can do this, but not 100% sure.
any tips, tricks, and implementation suggestions are greatly appreciated!
#89
Posted 29 June 2005 - 02:21 PM
Ralph (rad14701), on Jun 29 2005, 04:07 PM, said:
thought as much- and thanks for the quick reply! i do have a template made already for that website, and i *could* just force the client to use a document with this left-side/right-side format split by a graphic as a 'template-within-a-template' kinda thing (this is my current 'backup plan'), but my thought is that a second [*content*] variable is all i really need. i can then give the client some kind of drop-down ('left-side' etc.) menu in the edit page - something similar to choosing a template - so they can choose which side of the page they want a particular document content to be displayed.
i do believe i am fit enough in PHP to whip up a hack for this myself, but my post is more for a 'shout-out' to see if someone has already done this, or something similar, or those of you who understand the inner workings the best can see the hack(s) needed to complete my request. and i'd rather not re-invent the wheel if at all possible (time is money!).
thanks for your time!
[edit] hmm... maybe the ShowDoc snippet will do the job. (amazing what you find out when you search the forum and snippet library!)
Edited by digitalmouse, 29 June 2005 - 05:24 PM.
#90
Posted 02 July 2005 - 03:02 AM
Ralph (rad14701), on May 12 2005, 01:24 PM, said:
#91
Posted 14 September 2005 - 05:47 PM
When I use the checkbox or select-multiple options I get "ARRAY" where the Content Variable is called.
My Code is:
Name [[WhichMenus]]
Field type: checkbox
Field Elements : {{none}}||{{Menu1}}||{{Menu2}}||{{Menu3}} (all calling chunks)
I call [*WhichMenus*]
If I just check 1 it works, but if I check more that 1 I get the error.
I use the following types in the pages with no problems:
Text, HTML, Radio
Please can you help.
ceaza
Edited by ceaza, 14 September 2005 - 05:47 PM.
#92
Posted 15 September 2005 - 04:11 AM
ceaza, on Sep 15 2005, 12:47 AM, said:
If I just check 1 it works, but if I check more that 1 I get the error.
I'm sure there is a fix in the PHP code, but not having looked at that for nearly a year, I'm hesitant to even pull it up.
Here's a possible work around...
create three DocVar fields:
[*ShowMenu1*]
[*ShowMenu2*]
[*ShowMenu3*]
Each one can be a checkbox docvar with only one element in each. for example:
[[ShowMenu1]]
type: checkbox
element: {{Menu1}}
(the state of off or on will determine whether the element is displayed or not.)
... anyway... like I said, this could be solved with a little PHP.
you may want to check this in the root /index.php (mine it's around line 719):
//need to split array
$docvars[$docvar_row['field_name']] = explode("||", $docvar_row['field_value']);
possibly change that to avoid creation of an array type (which is what you see when the page gets rendered). Since the arrays really haven't been utilized, in your case you can just change that line to this:
//need to split array
$docvars[$docvar_row['field_name']] = str_replace ("||","", $docvar_row['field_value']);
If that doesn't work, then you might try this..
/manager/processors/save_content.processor.php
you need to find this code (it's around line 179 in my version):
Quote
$feature_insert = "";
while (list($featureValue, $feature_item) = each ($_POST[$row['field_name']]))
{
$feature_insert = "$feature_insert||$feature_item";
} // end while
// now remove the first two characters
$feature_insert_length = strlen($feature_insert);
$feature_insert_length = $feature_insert_length - 2;
$feature_insert = substr($feature_insert, 2, $feature_insert_length);
$docvars[$row['field_name']] = $feature_insert;
I think this needs to be modified to something more like this:
Quote
$feature_insert = "";
foreach($_POST[$row['field_name']] as $key => $value){
$feature_insert .= "||" . $value;
} // end while
// now remove the first two characters
$feature_insert_length = strlen($feature_insert);
$feature_insert_length = $feature_insert_length - 2;
$feature_insert = substr($feature_insert, 2, $feature_insert_length);
$docvars[$row['field_name']] = $feature_insert;
#93
Posted 15 September 2005 - 06:52 AM
#94
Posted 15 September 2005 - 01:02 PM
Quote
//need to split array
$docvars[$docvar_row['field_name']] = explode("||", $docvar_row['field_value']);
possibly change that to avoid creation of an array type (which is what you see when the page gets rendered). Since the arrays really haven't been utilized, in your case you can just change that line to this:
//need to split array
$docvars[$docvar_row['field_name']] = str_replace ("||","", $docvar_row['field_value']);
I chose this route rather than seperate DocVars for each due to the fact the you have to edit and reload each page that uses the template, if you have a way around that I would appreciate it.
Quote
I really would like to help but I am not great with coding, I would highly reccomend this in you next releases.
Once again guys you for such a cool CMS and all the mods that make it the only CMS to work with.
#95
Posted 15 September 2005 - 02:33 PM
I basically created this project years ago and rarely even look at it anymore. In fact I didn't know that E 0.6.1 was out until you mentioned it.
Ryan Thrash has a developer working on a fork of Etomite that includes a heavily modified DocVars in it. I think there are some other contributions embedded, and new features, but I haven't seen it. you can look through this forum for more information on his project.
If anyone wants to take DocVars and make it compatible with the new Etomite, I am happy to hand off. In fact the open source nature of the release means that anyone can modify DocVars. Based on the download count, it looks like several people have been using it, so there should be someone out there that has made some upgrades or changes.
Good luck.
JG
#96
Posted 15 October 2005 - 11:22 AM
apodigm, on Sep 21 2004, 05:07 AM, said:
etomite->getDocVars($resource[$x]['id'],'extra_content');
This basically says to get the docvar called 'extra_content' related to the page numbered by $resource[$x]['id']
Good luck.
I'm trying to do this .... but when the snnipet is running Always showing word Array
Here i'm attach picture and modifed snippet code.... Can any one tell me what i'm doing wrong???? Thanks
Attached Files
#97
Posted 15 October 2005 - 08:23 PM
Edited by apodigm, 15 October 2005 - 08:25 PM.
#98
Posted 15 October 2005 - 08:35 PM
replace:
$price = $etomite->getDocVars($resource[$x]['id'],'price');
with this:
$tmp = $etomite->getDocVars($resource[$x]['id'],'price');
$price = $tmp['price'];
#99
Posted 17 October 2005 - 10:27 AM
apodigm, on Oct 15 2005, 11:35 PM, said:
replace:
$price = $etomite->getDocVars($resource[$x]['id'],'price');
with this:
$tmp = $etomite->getDocVars($resource[$x]['id'],'price');
$price = $tmp['price'];
THANKS!!!! THAT IS GREAT!!! IT WAS SO SIPLE AT ALL!!!.... I WISH YOU LUCK!!!!
FOR OTHER... DOC VARS I'M NEED TO DO SAME?
#100
Posted 20 October 2005 - 08:51 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


This topic is locked










