Drake CMS Official Forums - read-only archive

You are reading the Drake CMS Official Forums archive, available for historical purposes only.

Drake CMS has been rebranded into Lanius CMS, visit the new Lanius CMS Official Forums if you need support about Lanius CMS or Drake CMS -> Lanius CMS migration.



Home page > General Discussion > Show on frontpage by default? Permanent link to this page
 
 
Author Message:
Gibzon
Show on frontpage by default?
29 January 2007 23:08
Anonymous Hi there, when i make news i want the "Show on frontpage" option to be "yes" by default so that always going to show on frontpage, i can change the code if you tell me where and how do i do it? pinch
 
legolas558
Re:Show on frontpage by default?
30 January 2007 13:43
Anonymous Change line 91 of components/content/com_content/content.php to
Code:
$conn->Execute("INSERT INTO dk_content (title,title_alias,introtext,bodytext,sectionid,".
"catid,created,modified,created_by,created_by_alias,published,ord ering,".
"metakey,metadesc,frontpage) ".
" VALUES ('$content_title','$content_title','$content_introtext','$content _bodytext',".
"$content_secid,$content_catid,'$time','$time',$my->id,'$my-&g t;username',$content_published,$order,".
"'$content_metakey','$content_metadesc',1)");
$order = $easydb->neworder("content_frontpage");
$content_id = $conn->Insert_ID();
$conn->Execute("INSERT INTO dk_content_frontpage (id,ordering) VALUES ($content_id,$order)");



Good luck! wink
 
Gibzon
Re:Show on frontpage by default?
30 January 2007 14:42
Anonymous i did it wrong or doesn't work, anyways i'm also interested to do this on Limbo if you can help me blush

http://forum.limboforge.org/index.php?topic=179.0
 
legolas558
Re:Show on frontpage by default?
30 January 2007 14:56
Anonymous I did not try the snippet I sent you, but with a few edits I am sure it would be working.

Aren't you able to do it? unsure You'd have to replace line 91 with the code I gave you, plus eventually declaring the global $easydb if it is not declared
 
Gibzon
Re:Show on frontpage by default?
30 January 2007 15:19
Anonymous the problem is that i don't know anything about php or sql, can you edit the code for me?

i think limbo it's the same so maybe i can figure it out if you help me first ermm
 
Top