Author |
Message |
neralex
Site Admin

Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Mon Jun 18, 2012 5:48 am |
|
Hey!
I have created a own little module with a index file and a file with the name entry. In the index is a while loop with the list of ids and in the file entry is the respective id content.
Now i have created a own dhfile:
Code:class dhchronicle extends dhclass {
function dhchronicle () {
global $prefix;
$this->content_id = 'chrid';
$this->content_table = $prefix . '_chronicle';
$this->contentTitleArray = array('year','year2','name');
$this->contentDescArray = array('shorttext','maintext');
$this->contentKeysArray = array('year','year2','name','shorttext','maintext');
// If pending content is stored in the same table, inactive content, private content, etc.
$this->activeWhere = '';
}
function getContentID() {
global $chrid, $file;
if(!isset($chrid)) {
$chrid = 0;
}
return $chrid;
}
function setContentID() {
global $chrid, $dhID;
$chrid = $dhID;
}
}
|
The output in the entry file is at the moment: year year2 title - sitename
1st question:
Is it possible to set the own dh_sContentSuffix only for this module, without to set the suffix for the rest of all modules? It should look like: year year2 title - modulename - sitename
2nd question:
Is it possible to fill the own dh_sContentSuffix with a free text? It should look like: year year2 title - my own suffix - sitename
3rd question:
Is it possible to become $dt_sDelim between year year2 title? It should look like: year - year2 - title - my own suffix - sitename
 |
|
|
|
 |
neralex

|
Posted:
Sat Jun 30, 2012 1:40 pm |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sun Jul 01, 2012 7:48 am |
|
I would suggest PM'ing kguske with the thread link and see if he can help answer. I know that he is quite busy with work travel, which is why I am suggesting that approach. Unfortunately I don't have direct experience with his DH tool. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
neralex

|
Posted:
Tue Jul 03, 2012 12:09 pm |
|
I was able to solve thing with the dt_sDelim in the dh.class.php but i don't understand it how can i put an freetext inside the contentTitleArray.
Code:$this->contentTitleArray = array('year','freetext','name');
|
|
|
|
|
 |
neralex

|
Posted:
Tue Jul 03, 2012 1:09 pm |
|
I was able to solve the 1st question with this one:
Code:class dhchronicle extends dhclass {
function dhchronicle () {
global $prefix;
$this->content_id = 'chrid';
$this->content_table = $prefix . '_chronicle, '.$prefix.'_modules';
$this->contentTitleArray = array('year','year2','name','custom_title');
$this->contentDescArray = array('shorttext','maintext');
$this->contentKeysArray = array('year','year2','name','shorttext','maintext');
// If pending content is stored in the same table, inactive content, private content, etc.
$this->activeWhere = 'title=\'chronicle\'';
}
function getContentID() {
global $chrid, $file;
if(!isset($chrid)) {
$chrid = 0;
}
return $chrid;
}
function setContentID() {
global $chrid, $dhID;
$chrid = $dhID;
}
}
|
|
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Fri Jul 06, 2012 3:06 pm |
|
Not sure if you can override the suffix or delimiter in the class (I'll check when I can, but not sure when...), but you could override the title / suffix for each content item... If you did that, you wouldn't need a class.  |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
neralex

|
Posted:
Fri Jul 06, 2012 4:28 pm |
|
Thanks for your reply!
kguske wrote: | ...but you could override the title / suffix for each content item... If you did that, you wouldn't need a class. |
Yes i know, but i want realize this issue without an override. I will wait on your check!
 |
|
|
|
 |
|