[geeklog-hg] geeklog: Articles, Topics, Polls and Staticpages all now can hav...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Jul 16 22:06:30 EDT 2013
changeset 9204:cf6c4b349b6d
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/cf6c4b349b6d
user: Tom <websitemaster at cogeco.net>
date: Tue Jul 16 22:04:08 2013 -0400
description:
Articles, Topics, Polls and Staticpages all now can have ids of 128 characters. Topic names can now also be upto 128 characters long. New javascript (title_2_id.js) that creates an id based on the title is now included with the Article and Topics editors. (feature request #0001666)
diffstat:
plugins/polls/functions.inc | 13 ++-
plugins/polls/sql/mssql_install.php | 8 +-
plugins/polls/sql/mssql_updates.php | 10 +-
plugins/polls/sql/mysql_install.php | 8 +-
plugins/polls/sql/mysql_updates.php | 10 +-
plugins/polls/sql/pgsql_install.php | 8 +-
plugins/polls/sql/pgsql_updates.php | 10 +-
plugins/polls/templates/admin/pollansweroption.thtml | 5 +-
plugins/polls/templates/admin/polleditor.thtml | 7 +-
plugins/polls/templates/admin/pollquestions.thtml | 5 +-
plugins/polls/templates/pollanswer.thtml | 6 +-
plugins/polls/templates/pollblock.thtml | 6 +-
plugins/polls/templates/pollcomments.thtml | 6 +-
plugins/polls/templates/polllist.thtml | 6 +-
plugins/polls/templates/pollquestion.thtml | 4 +
plugins/polls/templates/pollquestions.thtml | 6 +-
plugins/polls/templates/pollresult.thtml | 6 +-
plugins/polls/templates/pollvotes_bar.thtml | 4 +
plugins/polls/templates/pollvotes_num.thtml | 4 +
plugins/staticpages/sql/mssql_install.php | 2 +-
plugins/staticpages/sql/mssql_updates.php | 3 +-
plugins/staticpages/sql/mysql_install.php | 2 +-
plugins/staticpages/sql/mysql_updates.php | 3 +-
plugins/staticpages/sql/pgsql_install.php | 2 +-
plugins/staticpages/sql/pgsql_updates.php | 3 +-
plugins/staticpages/templates/admin/editor.thtml | 6 +-
plugins/staticpages/templates/admin/editor_advanced.thtml | 6 +-
public_html/admin/story.php | 1 +
public_html/admin/topic.php | 8 +-
public_html/docs/english/theme.html | 1 +
public_html/javascript/title_2_id.js | 57 ++++++++++
public_html/layout/denim/admin/story/storyeditor.thtml | 11 +-
public_html/layout/denim/admin/story/storyeditor_advanced.thtml | 11 +-
public_html/layout/denim/admin/topic/topiceditor.thtml | 13 +-
public_html/layout/modern_curve/admin/story/storyeditor.thtml | 6 +-
public_html/layout/modern_curve/admin/story/storyeditor_advanced.thtml | 6 +-
public_html/layout/modern_curve/admin/topic/topiceditor.thtml | 8 +-
public_html/layout/professional/admin/story/storyeditor.thtml | 7 +-
public_html/layout/professional/admin/story/storyeditor_advanced.thtml | 8 +-
public_html/layout/professional/admin/topic/topiceditor.thtml | 14 +-
public_html/layout/professional_css/admin/story/storyeditor.thtml | 11 +-
public_html/layout/professional_css/admin/story/storyeditor_advanced.thtml | 11 +-
public_html/layout/professional_css/admin/topic/topiceditor.thtml | 13 +-
sql/mssql_tableanddata.php | 26 ++--
sql/mysql_tableanddata.php | 24 ++--
sql/pgsql_tableanddata.php | 24 ++--
sql/updates/mssql_2.0.0_to_2.0.1.php | 18 ++-
sql/updates/mysql_2.0.0_to_2.0.1.php | 16 ++
sql/updates/pgsql_2.0.0_to_2.0.1.php | 16 ++
49 files changed, 327 insertions(+), 142 deletions(-)
diffs (truncated from 1390 to 300 lines):
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/functions.inc
--- a/plugins/polls/functions.inc Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/functions.inc Tue Jul 16 22:04:08 2013 -0400
@@ -1270,7 +1270,18 @@
polls_update_ConfigSecurity_2_1_3();
$current_version = '2.1.4';
- break;
+ break;
+
+ case '2.1.4':
+ if (isset($_UPDATES[$current_version])) {
+ $_SQL = $_UPDATES[$current_version];
+ foreach ($_SQL as $sql) {
+ DB_query($sql);
+ }
+ }
+
+ $current_version = '2.1.5';
+ break;
default:
$done = true;
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/sql/mssql_install.php
--- a/plugins/polls/sql/mssql_install.php Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/sql/mssql_install.php Tue Jul 16 22:04:08 2013 -0400
@@ -39,7 +39,7 @@
$_SQL[] = "
CREATE TABLE [dbo].[{$_TABLES['pollanswers']}] (
- [pid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
+ [pid] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[qid] [int] NOT NULL ,
[aid] [tinyint] NOT NULL ,
[answer] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
@@ -51,14 +51,14 @@
$_SQL[] = "
CREATE TABLE [dbo].[{$_TABLES['pollquestions']}] (
[qid] [int] NOT NULL ,
- [pid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
+ [pid] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[question] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
) ON [PRIMARY]
";
$_SQL[] = "
CREATE TABLE [dbo].[{$_TABLES['polltopics']}] (
- [pid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
+ [pid] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[topic] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[meta_description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[meta_keywords] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
@@ -83,7 +83,7 @@
$_SQL[] = "
CREATE TABLE [dbo].[{$_TABLES['pollvoters']}] (
[id] [numeric](10, 0) IDENTITY (1, 1) NOT NULL ,
- [pid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
+ [pid] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[ipaddress] [varchar] (39) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[date] [numeric](10, 0) NULL
) ON [PRIMARY]
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/sql/mssql_updates.php
--- a/plugins/polls/sql/mssql_updates.php Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/sql/mssql_updates.php Tue Jul 16 22:04:08 2013 -0400
@@ -95,8 +95,16 @@
// Delete Poll block since moved to dynamic
"DELETE FROM {$_TABLES['blocks']} WHERE phpblockfn = 'phpblock_polls'",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.polls.tab_poll_block', 'Access to configure poll block', 0)"
+ ),
+
+ '2.1.4' => array(
+ // Poll Id now 128 characters
+ "ALTER TABLE {$_TABLES['pollanswers']} CHANGE [pid] VARCHAR(128) NOT NULL DEFAULT ''",
+ "ALTER TABLE {$_TABLES['pollquestions']} CHANGE [pid] VARCHAR(128) NOT NULL DEFAULT ''",
+ "ALTER TABLE {$_TABLES['polltopics']} CHANGE [pid] VARCHAR(128) NOT NULL DEFAULT ''",
+ "ALTER TABLE {$_TABLES['pollvoters']} CHANGE [pid] VARCHAR(128) NOT NULL"
)
-
+
);
/**
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/sql/mysql_install.php
--- a/plugins/polls/sql/mysql_install.php Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/sql/mysql_install.php Tue Jul 16 22:04:08 2013 -0400
@@ -38,7 +38,7 @@
$_SQL[] = "
CREATE TABLE {$_TABLES['pollanswers']} (
- pid varchar(40) NOT NULL default '',
+ pid varchar(128) NOT NULL default '',
qid mediumint(9) NOT NULL default 0,
aid tinyint(3) unsigned NOT NULL default '0',
answer varchar(255) default NULL,
@@ -51,7 +51,7 @@
$_SQL[] = "
CREATE TABLE {$_TABLES['pollquestions']} (
qid mediumint(9) NOT NULL DEFAULT '0',
- pid varchar(40) NOT NULL default '',
+ pid varchar(128) NOT NULL default '',
question varchar(255) NOT NULL,
PRIMARY KEY (qid, pid)
) ENGINE=MyISAM
@@ -59,7 +59,7 @@
$_SQL[] = "
CREATE TABLE {$_TABLES['polltopics']} (
- pid varchar(40) NOT NULL default '',
+ pid varchar(128) NOT NULL default '',
topic varchar(255) default NULL,
meta_description TEXT NULL,
meta_keywords TEXT NULL,
@@ -90,7 +90,7 @@
$_SQL[] = "
CREATE TABLE {$_TABLES['pollvoters']} (
id int(10) unsigned NOT NULL auto_increment,
- pid varchar(20) NOT NULL,
+ pid varchar(128) NOT NULL,
ipaddress varchar(39) NOT NULL default '',
date int(10) unsigned default NULL,
PRIMARY KEY (id)
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/sql/mysql_updates.php
--- a/plugins/polls/sql/mysql_updates.php Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/sql/mysql_updates.php Tue Jul 16 22:04:08 2013 -0400
@@ -89,8 +89,16 @@
// Delete Poll block since moved to dynamic
"DELETE FROM {$_TABLES['blocks']} WHERE phpblockfn = 'phpblock_polls'",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.polls.tab_poll_block', 'Access to configure poll block', 0)"
+ ),
+
+ '2.1.4' => array(
+ // Poll Id now 128 characters
+ "ALTER TABLE {$_TABLES['pollanswers']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL DEFAULT ''",
+ "ALTER TABLE {$_TABLES['pollquestions']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL DEFAULT ''",
+ "ALTER TABLE {$_TABLES['polltopics']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL DEFAULT ''",
+ "ALTER TABLE {$_TABLES['pollvoters']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL"
)
-
+
);
/**
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/sql/pgsql_install.php
--- a/plugins/polls/sql/pgsql_install.php Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/sql/pgsql_install.php Tue Jul 16 22:04:08 2013 -0400
@@ -34,7 +34,7 @@
$_SQL[] = "
CREATE TABLE {$_TABLES['pollanswers']} (
- pid varchar(40) NOT NULL default '',
+ pid varchar(128) NOT NULL default '',
qid int NOT NULL default 0,
aid int NOT NULL default '0',
answer varchar(255) default NULL,
@@ -46,14 +46,14 @@
$_SQL[] = "
CREATE TABLE {$_TABLES['pollquestions']} (
qid int NOT NULL DEFAULT '0',
- pid varchar(40) NOT NULL default '',
+ pid varchar(128) NOT NULL default '',
question varchar(255) NOT NULL,
PRIMARY KEY (qid, pid))
";
$_SQL[] = "
CREATE TABLE {$_TABLES['polltopics']} (
- pid varchar(40) NOT NULL default '',
+ pid varchar(128) NOT NULL default '',
topic varchar(255) default NULL,
voters int default NULL,
meta_description TEXT NULL,
@@ -83,7 +83,7 @@
$_SQL[] = "
CREATE TABLE {$_TABLES['pollvoters']} (
id SERIAL,
- pid varchar(20) NOT NULL,
+ pid varchar(128) NOT NULL,
ipaddress varchar(15) NOT NULL default '',
date int default NULL,
PRIMARY KEY (id))
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/sql/pgsql_updates.php
--- a/plugins/polls/sql/pgsql_updates.php Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/sql/pgsql_updates.php Tue Jul 16 22:04:08 2013 -0400
@@ -45,7 +45,15 @@
// Delete Poll block since moved to dynamic
"DELETE FROM {$_TABLES['blocks']} WHERE phpblockfn = 'phpblock_polls'",
"INSERT INTO {$_TABLES['features']} (ft_name, ft_descr, ft_gl_core) VALUES ('config.polls.tab_poll_block', 'Access to configure poll block', 0)"
- )
+ ),
+
+ '2.1.4' => array(
+ // Poll Id now 128 characters
+ "ALTER TABLE {$_TABLES['pollanswers']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL DEFAULT ''",
+ "ALTER TABLE {$_TABLES['pollquestions']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL DEFAULT ''",
+ "ALTER TABLE {$_TABLES['polltopics']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL DEFAULT ''",
+ "ALTER TABLE {$_TABLES['pollvoters']} CHANGE `pid` `pid` VARCHAR(128) NOT NULL"
+ )
);
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/templates/admin/pollansweroption.thtml
--- a/plugins/polls/templates/admin/pollansweroption.thtml Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/templates/admin/pollansweroption.thtml Tue Jul 16 22:04:08 2013 -0400
@@ -1,8 +1,9 @@
+{# begin {templatelocation} #}
-<!-- plugins/polls/templates/admin/pollansweroption.thtml { -->
<div style="margin-bottom:1.5em;">
<input type="text" name="answer[{question_id}][]" value="{answer_text}" maxlength="255" class="size3"{xhtml}> /
<input type="text" name="votes[{question_id}][]" value="{answer_votes}" class="size1"{xhtml}> /
<input type="text" name="remark[{question_id}][]" value="{remark_text}" maxlength="255" class="size5"{xhtml}>
</div>
-<!-- } plugins/polls/templates/admin/pollansweroption.thtml -->
+
+{# end {templatelocation} #}
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/templates/admin/polleditor.thtml
--- a/plugins/polls/templates/admin/polleditor.thtml Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/templates/admin/polleditor.thtml Tue Jul 16 22:04:08 2013 -0400
@@ -1,5 +1,4 @@
-
-<!-- plugins/polls/templates/admin/polleditor.thtml { -->
+{# begin {templatelocation} #}
{noscript}
<div id="advanced_editor" style="display:none;">
@@ -7,7 +6,7 @@
<div class="admin_basic">
<dl class="form_block">
<dt><label for="polls-polleditor-pid">{lang_pollid}</label></dt>
- <dd><input type="text" dir="ltr" name="pid" value="{poll_id}" maxlength="40" id="polls-polleditor-pid" class="size5"{xhtml}> {lang_donotusespaces}</dd>
+ <dd><input type="text" dir="ltr" name="pid" value="{poll_id}" maxlength="128" id="polls-polleditor-pid" class="size5"{xhtml}> {lang_donotusespaces}</dd>
<dt><label for="polls-polleditor-topic">{lang_topic}</label></dt>
<dd><input type="text" name="topic" value="{poll_topic}" maxlength="255" id="polls-polleditor-topic" class="size6"{xhtml}><br{xhtml}>{poll_topic_info}</dd>
@@ -64,4 +63,4 @@
</form>
</div>
-<!-- } plugins/polls/templates/admin/polleditor.thtml -->
+{# end {templatelocation} #}
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/templates/admin/pollquestions.thtml
--- a/plugins/polls/templates/admin/pollquestions.thtml Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/templates/admin/pollquestions.thtml Tue Jul 16 22:04:08 2013 -0400
@@ -1,5 +1,5 @@
+{# begin {templatelocation} #}
-<!-- plugins/polls/templates/admin/pollquestions.thtml { -->
<div id="po_{question_id}" {style} class="wide">
<dl class="form_block">
<dt><label>{lang_question}</label></dt>
@@ -11,4 +11,5 @@
</div>
<hr class="separator"{xhtml}>
-<!-- } plugins/polls/templates/admin/pollquestions.thtml -->
+
+{# end {templatelocation} #}
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/templates/pollanswer.thtml
--- a/plugins/polls/templates/pollanswer.thtml Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/templates/pollanswer.thtml Tue Jul 16 22:04:08 2013 -0400
@@ -1,1 +1,5 @@
- <li><input type="radio" name="aid[{question_id}]" value="{answer_id}"{selected}{xhtml}> {answer_text}</li>
+{# begin {templatelocation} #}
+
+<li><input type="radio" name="aid[{question_id}]" value="{answer_id}"{selected}{xhtml}> {answer_text}</li>
+
+{# end {templatelocation} #}
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/templates/pollblock.thtml
--- a/plugins/polls/templates/pollblock.thtml Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/templates/pollblock.thtml Tue Jul 16 22:04:08 2013 -0400
@@ -1,3 +1,5 @@
+{# begin {templatelocation} #}
+
<span class="floatright">{edit_icon}</span><div class="poll-topic">{poll_topic}</div>
<form action="{poll_vote_url}" name="Vote" method="post">
<div>
@@ -11,4 +13,6 @@
<span class="pluginTinyText">
<a href="{site_url}/polls/index.php">{lang_polltopics}</a> | {num_votes} {lang_voters} {poll_comments}
-</span>
\ No newline at end of file
+</span>
+
+{# end {templatelocation} #}
\ No newline at end of file
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/templates/pollcomments.thtml
--- a/plugins/polls/templates/pollcomments.thtml Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/templates/pollcomments.thtml Tue Jul 16 22:04:08 2013 -0400
@@ -1,1 +1,5 @@
- | <a href="{poll_comments_url}">{num_comments} {lang_comments}</a>
+{# begin {templatelocation} #}
+
+| <a href="{poll_comments_url}">{num_comments} {lang_comments}</a>
+
+{# end {templatelocation} #}
diff -r e1b3f47b1d4a -r cf6c4b349b6d plugins/polls/templates/polllist.thtml
--- a/plugins/polls/templates/polllist.thtml Tue Jul 16 14:12:38 2013 -0400
+++ b/plugins/polls/templates/polllist.thtml Tue Jul 16 22:04:08 2013 -0400
@@ -1,1 +1,5 @@
More information about the geeklog-cvs
mailing list