From 73681a4b4307c0373676ab5941650cebbc0dd807 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 3 Oct 2010 19:55:56 +0000 Subject: [PATCH] Added Link Us Block; Fixed a small bug in user menu; --- .../en/mods/portal/portal_link_us_module.php | 38 ++++++++ .../en/mods/portal/portal_news_module.php | 2 + root/portal/modules/portal_link_us.php | 84 ++++++++++++++++++ root/portal/modules/portal_user_menu.php | 2 +- .../template/portal/modules/link_us_side.html | 5 ++ .../theme/images/portal/portal_link_us.png | Bin 0 -> 895 bytes 6 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 root/language/en/mods/portal/portal_link_us_module.php create mode 100644 root/portal/modules/portal_link_us.php create mode 100644 root/styles/prosilver/template/portal/modules/link_us_side.html create mode 100644 root/styles/prosilver/theme/images/portal/portal_link_us.png diff --git a/root/language/en/mods/portal/portal_link_us_module.php b/root/language/en/mods/portal/portal_link_us_module.php new file mode 100644 index 00000000..ad8a663c --- /dev/null +++ b/root/language/en/mods/portal/portal_link_us_module.php @@ -0,0 +1,38 @@ + 'Link to us', + 'LINK_US_TXT' => 'Please feel free to link to %s. Use the following HTML:', +)); + +?> \ No newline at end of file diff --git a/root/language/en/mods/portal/portal_news_module.php b/root/language/en/mods/portal/portal_news_module.php index c8084731..70637c9c 100644 --- a/root/language/en/mods/portal/portal_news_module.php +++ b/root/language/en/mods/portal/portal_news_module.php @@ -65,6 +65,8 @@ $lang = array_merge($lang, array( 'PORTAL_NEWS_SHOW_LAST_EXP' => 'When activated, the newest will be sorted in order to the newest posts. When deactivated, the news will be sorted in order to the newest topic.', 'PORTAL_NEWS_ARCHIVE' => 'Enable the news archive system', 'PORTAL_NEWS_ARCHIVE_EXP' => 'If enabled the news archive system / page numbers will be displayed.', + 'PORTAL_SHOW_REPLIES_VIEWS' => 'Display the number of replies and views', + 'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'This setting pertains to the compact block.
When Yes, the number of replies and views are shown in 2 extra columns. When No, replies and views will be shown beside the forum name. Select No if you have problems with the display of the extra columns due to the extra width required.', )); ?> \ No newline at end of file diff --git a/root/portal/modules/portal_link_us.php b/root/portal/modules/portal_link_us.php new file mode 100644 index 00000000..1f704dd6 --- /dev/null +++ b/root/portal/modules/portal_link_us.php @@ -0,0 +1,84 @@ +lang}/mods/portal/" + */ + var $language = 'portal_link_us_module'; + + function get_template_side($module_id) + { + global $config, $template, $user; + + //doing the easy way ;) + $u_link = generate_board_url(); + + // Assign specific vars + $template->assign_vars(array( + 'LINK_US_TXT' => sprintf($user->lang['LINK_US_TXT'], $config['sitename']), + 'U_LINK_US' => '<a href="' . $u_link . '" ' . (($config['site_desc']) ? 'title="' . $config['site_desc'] . '"' : '' ) . '>' . (($config['sitename']) ? $config['sitename'] : $u_link ) . '</a>', + )); + + return 'link_us_side.html'; + } + + function get_template_acp($module_id) + { + return false; + } + + /** + * API functions + */ + function install($module_id) + { + return true; + } + + function uninstall($module_id) + { + return true; + } +} + +?> \ No newline at end of file diff --git a/root/portal/modules/portal_user_menu.php b/root/portal/modules/portal_user_menu.php index d9582133..a872aa9e 100644 --- a/root/portal/modules/portal_user_menu.php +++ b/root/portal/modules/portal_user_menu.php @@ -157,7 +157,7 @@ class portal_user_menu_module function get_template_acp($module_id) { - return false + return false; } /** diff --git a/root/styles/prosilver/template/portal/modules/link_us_side.html b/root/styles/prosilver/template/portal/modules/link_us_side.html new file mode 100644 index 00000000..556c8e5e --- /dev/null +++ b/root/styles/prosilver/template/portal/modules/link_us_side.html @@ -0,0 +1,5 @@ + +{$LR_BLOCK_H_L} {L_LINK_US}{$LR_BLOCK_H_R} + {LINK_US_TXT}

+
+{$LR_BLOCK_F_L}{$LR_BLOCK_F_R} \ No newline at end of file diff --git a/root/styles/prosilver/theme/images/portal/portal_link_us.png b/root/styles/prosilver/theme/images/portal/portal_link_us.png new file mode 100644 index 0000000000000000000000000000000000000000..c688d5f6f9ae0dc083c5fac2316c819921a6c56a GIT binary patch literal 895 zcmV-_1AzRAP)S#@)vN0mNeCVJPEJ z6w31O8AQV`82*F6KcV>dABfzK-wX_F+zbqiD>sS&1Q5%+Pyhby-}9E?(}y1n%uEan z|A0392igEc5d0s4|3SrAfCMj)^_7{E;p^AG{{aGs<>TkS4Dniw3=Uc%V1!~qtaT@^bU}gXaAeKK2OhCW?V_@duVh|D* zW8mWA1>3{S%)%fjC=B!x$VET{{{IK#U%)_NW#?x2^X)GKNH0JDferZm=MRITk`fp* zK>aNwB*@_6;>dstTsrZQ;XgAY13&<=`~y0Jk%^h%*`xamm#*GokXKM((9~3Cc=zr- z!^Ml282$oX#|R9RzkeaY`t#>626aUVpdJ;VMNA9;0R#*KW^gcl{PdOK>9ZFM0)m2I zr~dfyi{bh6R}6pt`~wFn$SeQ<|6}<6{TG9{AQ!`bR-hozVt@c*`2#fN=da%knua{baa#^fM?v7ytqY91Bc9lit31&T#ksV+JvCaRzyL zIiMFlFx-+z|-@g3+`RT*|uW#S~|NHLQ{}p?l{pWDq{}CX7 zSU7n&nfBjjVz~Y0EjXQnLK~#Uw7;-){~w|W#Qyh>5h-&3@jp