Revision 66
Added by stefan about 20 years ago
| trunk/wb/include/htmlarea/popups/link.php | ||
|---|---|---|
| 75 | 75 |
global $template, $database; |
| 76 | 76 |
$get_pages = $database->query("SELECT page_id,menu_title,link,level FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND visibility!='deleted' ORDER BY position ASC");
|
| 77 | 77 |
while($page = $get_pages->fetchRow()) {
|
| 78 |
$title = $admin->strip_slashes_dummy($page['menu_title']);
|
|
| 78 |
$title = $page['menu_title'];
|
|
| 79 | 79 |
// Add leading -'s so we can tell what level a page is at |
| 80 | 80 |
$leading_dashes = ''; |
| 81 | 81 |
for($i = 0; $i < $page['level']; $i++) {
|
| ... | ... | |
| 99 | 99 |
$template->parse('page_list', 'page_list_block', true);
|
| 100 | 100 |
// Loop through pages |
| 101 | 101 |
while($page = $get_pages->fetchRow()) {
|
| 102 |
$title = $admin->strip_slashes_dummy($page['menu_title']);
|
|
| 102 |
$title = $page['menu_title'];
|
|
| 103 | 103 |
$template->set_var('TITLE', $title);
|
| 104 | 104 |
$template->set_var('LINK', '[wblink'.$page['page_id'].']');
|
| 105 | 105 |
$template->parse('page_list', 'page_list_block', true);
|
| trunk/wb/modules/menu_link/info.php | ||
|---|---|---|
| 1 | 1 |
<?php |
| 2 | 2 |
|
| 3 |
// $Id: info.php,v 1.3 2005/04/08 09:58:31 rdjurovich Exp $
|
|
| 3 |
// $Id$ |
|
| 4 | 4 |
|
| 5 | 5 |
/* |
| 6 | 6 |
|
| ... | ... | |
| 29 | 29 |
$module_version = '2.5'; |
| 30 | 30 |
$module_designed_for = '2.x'; |
| 31 | 31 |
$module_author = 'Ryan Djurovich'; |
| 32 |
$module_description = 'This module allows you to edit the contents of a page using the MENU_LINK htmlArea program';
|
|
| 32 |
$module_description = 'This module allows you to insert a link into the menu.';
|
|
| 33 | 33 |
|
| 34 | 34 |
?> |
| trunk/wb/modules/wysiwyg/modify.php | ||
|---|---|---|
| 23 | 23 |
|
| 24 | 24 |
*/ |
| 25 | 25 |
|
| 26 |
if(!defined('WB_PATH')) exit('Direct access to this file is not allowed');
|
|
| 26 | 27 |
|
| 27 |
|
|
| 28 | 28 |
// Get page content |
| 29 | 29 |
$query = "SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'"; |
| 30 | 30 |
$get_content = $database->query($query); |
| trunk/wb/modules/news/modify_post.php | ||
|---|---|---|
| 132 | 132 |
<td valign="top"><?php echo $TEXT['SHORT']; ?>:</td> |
| 133 | 133 |
<td> |
| 134 | 134 |
<?php |
| 135 |
show_wysiwyg_editor("short","short",$fetch_content['short'],"100%","135px");
|
|
| 135 |
show_wysiwyg_editor("short","short",$fetch_content['content_short'],"100%","135px");
|
|
| 136 | 136 |
?> |
| 137 | 137 |
</td> |
| 138 | 138 |
</tr> |
| ... | ... | |
| 140 | 140 |
<td valign="top"><?php echo $TEXT['LONG']; ?>:</td> |
| 141 | 141 |
<td> |
| 142 | 142 |
<?php |
| 143 |
show_wysiwyg_editor("long","long",$fetch_content['long'],"100%","300px");
|
|
| 143 |
show_wysiwyg_editor("long","long",$fetch_content['content_long'],"100%","300px");
|
|
| 144 | 144 |
?> |
| 145 | 145 |
</td> |
| 146 | 146 |
</tr> |
| trunk/wb/modules/news/save_post.php | ||
|---|---|---|
| 100 | 100 |
} |
| 101 | 101 |
|
| 102 | 102 |
// Update row |
| 103 |
$database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET group_id = '$group_id', title = '$title', link = '$post_link', short = '$short', `long` = '$long', commenting = '$commenting', active = '$active', posted_when = '".mktime()."', posted_by = '".$admin->get_user_id()."' WHERE post_id = '$post_id'");
|
|
| 103 |
$database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET group_id = '$group_id', title = '$title', link = '$post_link', content_short = '$short', content_long = '$long', commenting = '$commenting', active = '$active', posted_when = '".mktime()."', posted_by = '".$admin->get_user_id()."' WHERE post_id = '$post_id'");
|
|
| 104 | 104 |
|
| 105 | 105 |
// Check if there is a db error, otherwise say successful |
| 106 | 106 |
if($database->is_error()) {
|
| trunk/wb/modules/news/install.php | ||
|---|---|---|
| 1 | 1 |
<?php |
| 2 | 2 |
|
| 3 |
// $Id: install.php,v 1.6 2005/04/02 08:21:46 rdjurovich Exp $
|
|
| 3 |
// $Id$ |
|
| 4 | 4 |
|
| 5 | 5 |
/* |
| 6 | 6 |
|
| ... | ... | |
| 35 | 35 |
. '`position` INT NOT NULL,' |
| 36 | 36 |
. '`title` VARCHAR(255) NOT NULL,' |
| 37 | 37 |
. '`link` TEXT NOT NULL,' |
| 38 |
. '`short` TEXT NOT NULL,' |
|
| 39 |
. '`long` TEXT NOT NULL,' |
|
| 38 |
. '`content_short` TEXT NOT NULL,'
|
|
| 39 |
. '`content_long` TEXT NOT NULL,'
|
|
| 40 | 40 |
. '`commenting` VARCHAR(7) NOT NULL,' |
| 41 | 41 |
. '`posted_when` INT NOT NULL ,' |
| 42 | 42 |
. '`posted_by` INT NOT NULL ,' |
| ... | ... | |
| 107 | 107 |
// Query body |
| 108 | 108 |
$query_body_code = " |
| 109 | 109 |
[TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.title LIKE \'%[STRING]%\' |
| 110 |
OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.short LIKE \'%[STRING]%\' |
|
| 111 |
OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.long LIKE \'%[STRING]%\' |
|
| 110 |
OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_short LIKE \'%[STRING]%\'
|
|
| 111 |
OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_long LIKE \'%[STRING]%\'
|
|
| 112 | 112 |
OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.title LIKE \'%[STRING]%\' |
| 113 | 113 |
OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.comment LIKE \'%[STRING]%\' |
| 114 | 114 |
OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.header LIKE \'%[STRING]%\' |
| trunk/wb/modules/news/rss.php | ||
|---|---|---|
| 77 | 77 |
echo "<item>"; |
| 78 | 78 |
echo "<title>".$item["title"]."</title>"; |
| 79 | 79 |
// Stripping HTML Tags for text-only visibility |
| 80 |
echo "<description>".strip_tags($item["short"])."</description>"; |
|
| 80 |
echo "<description>".strip_tags($item["content_short"])."</description>";
|
|
| 81 | 81 |
echo "<link>".WB_URL."/pages".$item["link"].PAGE_EXTENSION."</link>"; |
| 82 | 82 |
/* Add further (non required) information here like ie. |
| 83 | 83 |
echo "<author>".$item["posted_by"]."</author>"); |
| trunk/wb/modules/news/view.php | ||
|---|---|---|
| 105 | 105 |
} |
| 106 | 106 |
|
| 107 | 107 |
// Query posts (for this page) |
| 108 |
$query_posts = $database->query("SELECT group_id,post_id,title,link,short,posted_by,posted_when FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id' AND active = '1' AND title != ''$query_extra ORDER BY position DESC".$limit_sql);
|
|
| 108 |
$query_posts = $database->query("SELECT group_id,post_id,title,link,content_short,posted_by,posted_when FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id' AND active = '1' AND title != ''$query_extra ORDER BY position DESC".$limit_sql);
|
|
| 109 | 109 |
$num_posts = $query_posts->numRows(); |
| 110 | 110 |
|
| 111 | 111 |
// Create previous and next links |
| ... | ... | |
| 185 | 185 |
if($group_image == '') { $display_image = 'none'; } else { $display_image = ''; }
|
| 186 | 186 |
if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
|
| 187 | 187 |
// Replace [wblink--PAGE_ID--] with real link |
| 188 |
$short = $this->strip_slashes_dummy($post['short']); |
|
| 188 |
$short = $this->strip_slashes_dummy($post['content_short']);
|
|
| 189 | 189 |
$this->preprocess($short); |
| 190 | 190 |
// Replace vars with values |
| 191 | 191 |
$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[LINK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]', '[TEXT_READ_MORE]');
|
| ... | ... | |
| 258 | 258 |
if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
|
| 259 | 259 |
$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[BACK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]');
|
| 260 | 260 |
if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
|
| 261 |
$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['short']), $page_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']); |
|
| 261 |
$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['content_short']), $page_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']);
|
|
| 262 | 262 |
} else {
|
| 263 |
$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['short']), $page_link, $post_date, $post_time, '', '', '', ''); |
|
| 263 |
$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->strip_slashes_dummy($post['title']), $this->strip_slashes_dummy($post['content_short']), $page_link, $post_date, $post_time, '', '', '', '');
|
|
| 264 | 264 |
} |
| 265 |
$post_long = $this->strip_slashes_dummy($post['long']); |
|
| 265 |
$post_long = $this->strip_slashes_dummy($post['content_long']);
|
|
| 266 | 266 |
} |
| 267 | 267 |
} else {
|
| 268 | 268 |
header('Location: '.WB_URL.'/pages/');
|
Also available in: Unified diff
Changed column names in mod_news_posts from short,long to content_short, content_long.