[dw-free] Custom text module
[commit: http://hg.dwscoalition.org/dw-free/rev/4d1f317cc75c]
http://bugs.dwscoalition.org/show_bug.cgi?id=908
Custom text module (core, tabula rasa, negatives)
Patch by
draigwen.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=908
Custom text module (core, tabula rasa, negatives)
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- bin/upgrading/s2layers/core2.s2
- bin/upgrading/s2layers/core2base/layout.s2
- bin/upgrading/s2layers/negatives/layout.s2
-------------------------------------------------------------------------------- diff -r a49d7c481fa6 -r 4d1f317cc75c bin/upgrading/s2layers/core2.s2 --- a/bin/upgrading/s2layers/core2.s2 Fri May 15 01:03:04 2009 +0000 +++ b/bin/upgrading/s2layers/core2.s2 Sat May 16 02:14:22 2009 +0000 @@ -1385,6 +1385,10 @@ property bool module_customtext_show property bool module_customtext_show { grouped = 1; } property int module_customtext_order { grouped = 1; } property string module_customtext_section { grouped = 1; } + +set module_customtext_show = false; +set module_customtext_order = 13; +set module_customtext_section = "one"; ##=============================== ## Journal style - fonts ##=============================== @@ -1830,11 +1834,37 @@ property string text_module_popular_tags example = "Most Popular Tags"; } +property string text_module_customtext { + des = "Text for the 'Custom text' heading"; + maxlength = 50; + size = 20; + example = "Custom text"; +} + +property string text_module_customtext_content { + des = "Text for the 'Custom text' box"; + cols = 50; + rows = 10; + string_mode = "plain"; +} + +property string text_module_customtext_url { + des = "URL for 'Custom text' header link"; + maxlenght = 100; + size = 20; + example = "http://www.dreamwidth.org"; +} + + set text_module_links = "Links"; set text_module_pagesummary = "Page Summary"; set text_module_syndicate = "Syndicate"; set text_module_tags = "Tags"; set text_module_popular_tags = "Most Popular Tags"; + +set text_module_customtext = "Custom text"; +set text_module_customtext_content = ""; +set text_module_customtext_url = ""; ##=============================== ## Text - entry comment-related @@ -2276,6 +2306,9 @@ function modules_init() if ( $*module_pagesummary_show ) { $*module_sections{$*module_pagesummary_section}[$*module_pagesummary_order]=["pagesummary"]; } if ( $*module_time_show ) { $*module_sections{$*module_time_section}[$*module_time_order]=["time"]; } if ( $*module_poweredby_show ) { $*module_sections{$*module_poweredby_section}[$*module_poweredby_order]=["poweredby"]; } + if ( $*module_customtext_show ) { $*module_sections{$*module_customtext_section}[$*module_customtext_order]=["customtext"]; } + + #if ( $*module_%%mod%%_show ) { $*module_sections{$*module_%%mod%%_section }[$*module_%%mod%%_order]=["%%mod%%"]; } } @@ -3246,10 +3279,10 @@ function print_module_syndicate() { close_module(); } -function print_module_customtext(string title, string text, string titlelink_url) { - var Page p = get_page(); - open_module("customtext", $title, $titlelink_url); - print safe $text; +function print_module_customtext() { + var Page p = get_page(); + open_module("customtext", $*text_module_customtext, $*text_module_customtext_url); + print safe $*text_module_customtext_content; close_module(); } function print_module_links() { @@ -3321,10 +3354,7 @@ function handle_module_group_array(strin print_module_syndicate(); } elseif ($module == "customtext") { - var string title = $item[1]; - var string text = $item[2]; - var string titlelink_url = $item[3]; - print_module_customtext($title, $text, $titlelink_url); + print_module_customtext(); } elseif ($module == "links") { print_module_links(); diff -r a49d7c481fa6 -r 4d1f317cc75c bin/upgrading/s2layers/core2base/layout.s2 --- a/bin/upgrading/s2layers/core2base/layout.s2 Fri May 15 01:03:04 2009 +0000 +++ b/bin/upgrading/s2layers/core2base/layout.s2 Sat May 16 02:14:22 2009 +0000 @@ -116,7 +116,7 @@ propgroup modules { propgroup modules { property use module_userprofile_group; property use module_navlinks_group; - #property use module_customtext_group; + property use module_customtext_group; property use module_calendar_group; property use module_pagesummary_group; property use module_tags_group; @@ -179,6 +179,9 @@ propgroup text { property use text_unwatch_comments; property use text_permalink; + property use text_module_customtext; + property use text_module_customtext_content; + property use text_module_customtext_url; } function Page::print_default_stylesheet() { diff -r a49d7c481fa6 -r 4d1f317cc75c bin/upgrading/s2layers/negatives/layout.s2 --- a/bin/upgrading/s2layers/negatives/layout.s2 Fri May 15 01:03:04 2009 +0000 +++ b/bin/upgrading/s2layers/negatives/layout.s2 Sat May 16 02:14:22 2009 +0000 @@ -88,7 +88,7 @@ propgroup modules { propgroup modules { property use module_userprofile_group; property use module_navlinks_group; - #property use module_customtext_group; + property use module_customtext_group; property use module_calendar_group; property use module_pagesummary_group; property use module_tags_group; @@ -115,7 +115,6 @@ set module_calendar_opts_type = "horizon set module_time_section = "none"; set module_poweredby_section = "one"; - ##=============================== ## Custom CSS @@ -173,6 +172,10 @@ propgroup text { property use text_watch_comments; property use text_unwatch_comments; property use text_permalink; + + property use text_module_customtext; + property use text_module_customtext_content; + property use text_module_customtext_url; } set font_base ="Georgia"; --------------------------------------------------------------------------------