From 9863e49cdb694100ec8dd7fa6d2fd25ff362010f Mon Sep 17 00:00:00 2001 From: marj Date: Sun, 23 Aug 2009 10:57:51 +0000 Subject: [PATCH] a bit of legacy BULLET code review --- e107_admin/users.php | 38 +++++++--- e107_files/shortcode/batch/news_archives.php | 14 +++- e107_handlers/search/search_event.php | 17 +++-- e107_handlers/search_class.php | 23 ++++-- e107_plugins/alt_news/alt_news.php | 20 ++++-- .../calendar_menu/calendar_shortcodes.php | 36 ++++++---- e107_plugins/chatbox_menu/chat_template.php | 14 ++-- e107_plugins/chatbox_menu/chatbox_menu.php | 16 +++-- .../comment_menu/comment_menu_shortcodes.php | 15 +++- e107_plugins/content/content_shortcodes.php | 26 +++++-- .../content/handlers/content_class.php | 21 ++++-- e107_plugins/forum/newforumposts_menu.php | 9 +-- e107_plugins/links_page/link_menu.php | 11 ++- e107_plugins/links_page/link_shortcodes.php | 70 +++++++++++++------ e107_plugins/list_new/list_class.php | 12 ++-- e107_plugins/login_menu/login_menu.php | 10 +-- .../login_menu/login_menu_shortcodes.php | 11 +-- page.php | 20 +++--- userposts.php | 22 +++--- 19 files changed, 277 insertions(+), 128 deletions(-) diff --git a/e107_admin/users.php b/e107_admin/users.php index 3400b22c5..5e31f9bb2 100644 --- a/e107_admin/users.php +++ b/e107_admin/users.php @@ -10,9 +10,9 @@ * Administration Area - Users * * $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $ -* $Revision: 1.54 $ -* $Date: 2009-08-22 21:27:34 $ -* $Author: e107steved $ +* $Revision: 1.55 $ +* $Date: 2009-08-23 10:57:51 $ +* $Author: marj_nl_fr $ * */ require_once ('../class2.php'); @@ -749,11 +749,19 @@ class users function user_info($ipd) { - global $ns,$sql,$e107; + global $ns, $sql, $e107; if (isset($ipd)) { - if(!defined("BULLET")) define("BULLET", "bullet2.gif"); + $bullet = ''; + if(defined('BULLET')) + { + $bullet = ''; + } + elseif(file_exists(THEME.'images/bullet2.gif')) + { + $bullet = ''; + } // TODO - move to e_userinfo.php $obj = new convert; $sql->db_Select("chatbox", "*", "cb_ip='$ipd' LIMIT 0,20"); @@ -767,9 +775,14 @@ class users $datestamp = $obj->convert_date($cb_datestamp, "short"); $post_author_id = substr($cb_nick, 0, strpos($cb_nick, ".")); $post_author_name = substr($cb_nick, (strpos($cb_nick, ".")+1)); - $text .= "bullet - ".$post_author_name." (".USFLAN_6.": ".$post_author_id.")\n
".$datestamp."
". $cb_message." -

"; + $text .= $bullet." + ".$post_author_name." (".USFLAN_6.": ".$post_author_id.") +
+ ".$datestamp." +
+ ". $cb_message." +
+
"; } $text .= "
"; @@ -780,8 +793,13 @@ class users $datestamp = $obj->convert_date($comment_datestamp, "short"); $post_author_id = substr($comment_author, 0, strpos($comment_author, ".")); $post_author_name = substr($comment_author, (strpos($comment_author, ".")+1)); - $text .= "bullet - ".$post_author_name." (".USFLAN_6.": ".$post_author_id.")\n
".$datestamp."
". $comment_comment."

"; + $text .= $bullet." + ".$post_author_name." (".USFLAN_6.": ".$post_author_id.") +
+ ".$datestamp." +
". $comment_comment." +
+
"; } } diff --git a/e107_files/shortcode/batch/news_archives.php b/e107_files/shortcode/batch/news_archives.php index a436e492e..3bd9a5cf6 100644 --- a/e107_files/shortcode/batch/news_archives.php +++ b/e107_files/shortcode/batch/news_archives.php @@ -18,9 +18,17 @@ $news_archive_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__); /* SC_BEGIN ARCHIVE_BULLET -global $news2; -//TODO review bullt -return ""; +//TODO review bullet +$bullet = ''; +if(defined('BULLET')) +{ + $bullet = ''; +} +elseif(file_exists(THEME.'images/bullet2.gif')) +{ + $bullet = ''; +} +return $bullet; SC_END SC_BEGIN ARCHIVE_LINK diff --git a/e107_handlers/search/search_event.php b/e107_handlers/search/search_event.php index 89be8dd65..3ce3ea885 100644 --- a/e107_handlers/search/search_event.php +++ b/e107_handlers/search/search_event.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/search/search_event.php,v $ -| $Revision: 1.1.1.1 $ -| $Date: 2006-12-02 04:34:05 $ -| $Author: mcfly_e107 $ +| $Revision: 1.2 $ +| $Date: 2009-08-23 10:57:51 $ +| $Author: marj_nl_fr $ +----------------------------------------------------------------------------+ */ @@ -60,7 +60,16 @@ while (list($event_id, $event_stake, $event_ward, $event_organisation, $event_st if (!$event_url_) { $event_threat_ = $event_threat; } - $text .= "bullet {$event_title}{$event_details}
"; + $bullet = ''; + if(defined('BULLET')) + { + $bullet = ''; + } + elseif(file_exists(THEME.'images/bullet2.gif')) + { + $bullet = ''; + } + $text .= $bullet." {$event_title}{$event_details}
"; } $qtype = LAN_911; ?> \ No newline at end of file diff --git a/e107_handlers/search_class.php b/e107_handlers/search_class.php index 8e7671f78..abd1b0172 100644 --- a/e107_handlers/search_class.php +++ b/e107_handlers/search_class.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/search_class.php,v $ -| $Revision: 1.1.1.1 $ -| $Date: 2006-12-02 04:33:57 $ -| $Author: mcfly_e107 $ +| $Revision: 1.2 $ +| $Date: 2009-08-23 10:57:51 $ +| $Author: marj_nl_fr $ +----------------------------------------------------------------------------+ */ @@ -29,10 +29,19 @@ class e_search { var $stopwords_php = "|a|about|an|and|are|as|at|be|by|com|edu|for|from|how|i|in|is|it|of|on|or|that|the|this|to|was|what|when|where|who|will|with|the|www|"; var $stopwords_mysql = "|a|a's|able|about|above|according|accordingly|across|actually|after|afterwards|again|against|ain't|all|allow|allows|almost|alone|along|already|also|although|always|am|among|amongst|an|and|another|any|anybody|anyhow|anyone|anything|anyway|anyways|anywhere|apart|appear|appreciate|appropriate|are|aren't|around|as|aside|ask|asking|associated|at|available|away|awfully|be|became|because|become|becomes|becoming|been|before|beforehand|behind|being|believe|below|beside|besides|best|better|between|beyond|both|brief|but|by|c'mon|c's|came|can|can't|cannot|cant|cause|causes|certain|certainly|changes|clearly|co|com|come|comes|concerning|consequently|consider|considering|contain|containing|contains|corresponding|could|couldn't|course|currently|definitely|described|despite|did|didn't|different|do|does|doesn't|doing|don't|done|down|downwards|during|each|edu|eg|eight|either|else|elsewhere|enough|entirely|especially|et|etc|even|ever|every|everybody|everyone|everything|everywhere|ex|exactly|example|except|far|few|fifth|first|five|followed|following|follows|for|former|formerly|forth|four|from|further|furthermore|get|gets|getting|given|gives|go|goes|going|gone|got|gotten|greetings|had|hadn't|happens|hardly|has|hasn't|have|haven't|having|he|he's|hello|help|hence|her|here|here's|hereafter|hereby|herein|hereupon|hers|herself|hi|him|himself|his|hither|hopefully|how|howbeit|however|i|i'd|i'll|i'm|i've|ie|if|ignored|immediate|in|inasmuch|inc|indeed|indicate|indicated|indicates|inner|insofar|instead|into|inward|is|isn't|it|it'd|it'll|it's|its|itself|just|keep|keeps|kept|know|knows|known|last|lately|later|latter|latterly|least|less|lest|let|let's|like|liked|likely|little|look|looking|looks|ltd|mainly|many|may|maybe|me|mean|meanwhile|merely|might|more|moreover|most|mostly|much|must|my|myself|name|namely|nd|near|nearly|necessary|need|needs|neither|never|nevertheless|new|next|nine|no|nobody|non|none|noone|nor|normally|not|nothing|novel|now|nowhere|obviously|of|off|often|oh|ok|okay|old|on|once|one|ones|only|onto|or|other|others|otherwise|ought|our|ours|ourselves|out|outside|over|overall|own|particular|particularly|per|perhaps|php|placed|please|plus|possible|presumably|probably|provides|que|quite|qv|rather|rd|re|really|reasonably|regarding|regardless|regards|relatively|respectively|right|said|same|saw|say|saying|says|second|secondly|see|seeing|seem|seemed|seeming|seems|seen|self|selves|sensible|sent|serious|seriously|seven|several|shall|she|should|shouldn't|since|six|so|some|somebody|somehow|someone|something|sometime|sometimes|somewhat|somewhere|soon|sorry|specified|specify|specifying|still|sub|such|sup|sure|t's|take|taken|tell|tends|th|than|thank|thanks|thanx|that|that's|thats|the|their|theirs|them|themselves|then|thence|there|there's|thereafter|thereby|therefore|therein|theres|thereupon|these|they|they'd|they'll|they're|they've|think|third|this|thorough|thoroughly|those|though|three|through|throughout|thru|thus|to|together|too|took|toward|towards|tried|tries|truly|try|trying|twice|two|un|under|unfortunately|unless|unlikely|until|unto|up|upon|us|use|used|useful|uses|using|usually|value|various|very|via|viz|vs|want|wants|was|wasn't|way|we|we'd|we'll|we're|we've|welcome|well|went|were|weren't|what|what's|whatever|when|whence|whenever|where|where's|whereafter|whereas|whereby|wherein|whereupon|wherever|whether|which|while|whither|who|who's|whoever|whole|whom|whose|why|will|willing|wish|with|within|without|won't|wonder|would|would|wouldn't|yes|yet|you|you'd|you'll|you're|you've|your|yours|yourself|yourselves|zero|"; - function e_search() { - global $query, $tp; - $this -> query = $query; - $this -> bullet = (defined("BULLET") ? "" : ""); + function e_search() + { + $this->query = $query; + $this->bullet = ''; + if(defined('BULLET')) + { + $this->bullet = ''; + } + elseif(file_exists(THEME.'images/bullet2.gif')) + { + $this->bullet = 'bullet'; + } + preg_match_all('/(\W?".*?")|(.*?)(\s|$)/', $this -> query, $boolean_keys); sort($this -> keywords['split'] = array_unique(array_filter(str_replace('"', '', array_merge($boolean_keys[1], $boolean_keys[2]))))); foreach ($this -> keywords['split'] as $k_key => $key) { diff --git a/e107_plugins/alt_news/alt_news.php b/e107_plugins/alt_news/alt_news.php index 350d292d5..73ac9bc7a 100644 --- a/e107_plugins/alt_news/alt_news.php +++ b/e107_plugins/alt_news/alt_news.php @@ -9,8 +9,8 @@ * Alternate News * * $Source: /cvs_backup/e107_0.8/e107_plugins/alt_news/alt_news.php,v $ - * $Revision: 1.4 $ - * $Date: 2009-07-06 07:14:47 $ + * $Revision: 1.5 $ + * $Date: 2009-08-23 10:57:50 $ * $Author: marj_nl_fr $ */ @@ -44,9 +44,19 @@ function alt_news($news_category) { $datestamp = $gen->convert_date($news_datestamp, "short"); $news_body = strip_tags(substr($news_body, 0, 100))." ..."; $comment_total = $sql2->db_Count("comments", "(*)", "WHERE comment_item_id='".intval($news_id)."' AND comment_type='0' "); - $text .= "
- bullet "; - + $bullet = ''; + if(defined('BULLET')) + { + $bullet = ''; + } + elseif(file_exists(THEME.'images/bullet2.gif')) + { + $bullet = ''; + } + $text .= " +
+ ".$bullet; + if ($news_allow_comments) { $text .= "".$news_title.""; } else { diff --git a/e107_plugins/calendar_menu/calendar_shortcodes.php b/e107_plugins/calendar_menu/calendar_shortcodes.php index 9005b2c96..50b64b9b8 100644 --- a/e107_plugins/calendar_menu/calendar_shortcodes.php +++ b/e107_plugins/calendar_menu/calendar_shortcodes.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_shortcodes.php,v $ -| $Revision: 1.10 $ -| $Date: 2009-07-25 07:54:34 $ +| $Revision: 1.11 $ +| $Date: 2009-08-23 10:57:51 $ | $Author: marj_nl_fr $ | +----------------------------------------------------------------------------+ @@ -140,15 +140,21 @@ SC_END // CALENDAR SHOWEVENT ------------------------------------------------------------ SC_BEGIN EC_SHOWEVENT_IMAGE + //TODO review bullet global $ev; + + $img = ''; if($ev['event_cat_icon'] && file_exists(e_PLUGIN."calendar_menu/images/".$ev['event_cat_icon'])) { $img = ""; } - else + elseif(defined('BULLET')) { - //TODO review bullet - $img = ""; + $img = ''; + } + elseif(file_exists(THEME.'images/bullet2.gif')) + { + $img = ''; } return $img; SC_END @@ -547,14 +553,18 @@ SC_BEGIN EC_NEXT_EVENT_ICON $fe_icon_file = ""; if ($pref['eventpost_showcaticon'] == 1) { - if($cal_row['event_cat_icon'] && file_exists(e_PLUGIN."calendar_menu/images/".$cal_row['event_cat_icon'])) - { - $fe_icon_file = e_PLUGIN_ABS."calendar_menu/images/".$cal_row['event_cat_icon']; - } - else - { - $fe_icon_file = THEME_ABS."images/".(defined("BULLET") ? BULLET : "bullet2.gif"); - } + if($cal_row['event_cat_icon'] && file_exists($ecal_dir."images/".$cal_row['event_cat_icon'])) + { + $fe_icon_file = $ecal_dir."images/".$cal_row['event_cat_icon']; + } + elseif(defined('BULLET')) + { + $img = HEME.'images/'.BULLET; + } + elseif(file_exists(THEME.'images/bullet2.gif')) + { + $img = THEME.'images/bullet2.gif'; + } } return $fe_icon_file; SC_END diff --git a/e107_plugins/chatbox_menu/chat_template.php b/e107_plugins/chatbox_menu/chat_template.php index 5ed23b703..8a9eb39c9 100644 --- a/e107_plugins/chatbox_menu/chat_template.php +++ b/e107_plugins/chatbox_menu/chat_template.php @@ -7,14 +7,18 @@ if(!$CHAT_TABLE_START){ $CHAT_TABLE_START = "
"; } -if(!$CHAT_TABLE){ - $CHAT_TABLE = "\n +if(!$CHAT_TABLE) +{ +//TODO review bullet + $CHAT_TABLE = "
- bullet \n{CHAT_TABLE_NICK} ".CHATBOX_L22." {CHAT_TABLE_DATESTAMP}
-
{CHAT_TABLE_MESSAGE}
\n + bullet + {CHAT_TABLE_NICK} ".CHATBOX_L22." {CHAT_TABLE_DATESTAMP} +
+
{CHAT_TABLE_MESSAGE}
-
\n"; + "; } if(!$CHAT_TABLE_END){ diff --git a/e107_plugins/chatbox_menu/chatbox_menu.php b/e107_plugins/chatbox_menu/chatbox_menu.php index b34fd8a2a..4509b518f 100644 --- a/e107_plugins/chatbox_menu/chatbox_menu.php +++ b/e107_plugins/chatbox_menu/chatbox_menu.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/chatbox_menu/chatbox_menu.php,v $ -| $Revision: 1.14 $ -| $Date: 2009-08-15 11:55:30 $ +| $Revision: 1.15 $ +| $Date: 2009-08-23 10:57:50 $ | $Author: marj_nl_fr $ +----------------------------------------------------------------------------+ */ @@ -209,9 +209,17 @@ if(!$text = $e107cache->retrieve("nq_chatbox")) $cb_message = str_replace($search, $replace, $cb_message); global $CHATBOXSTYLE; - if(!$CHATBOXSTYLE) + if( ! $CHATBOXSTYLE) { - $bullet = (defined("BULLET") ? "" : ""); + $bullet = ''; + if(defined('BULLET')) + { + $bullet = ''; + } + elseif(file_exists(THEME.'images/bullet2.gif')) + { + $bullet = ''; + } // default chatbox style $CHATBOXSTYLE = "\n
$bullet {USERNAME}
{TIMEDATE}
{MESSAGE}

\n"; diff --git a/e107_plugins/comment_menu/comment_menu_shortcodes.php b/e107_plugins/comment_menu/comment_menu_shortcodes.php index bec1eaa75..352472b58 100644 --- a/e107_plugins/comment_menu/comment_menu_shortcodes.php +++ b/e107_plugins/comment_menu/comment_menu_shortcodes.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/comment_menu/comment_menu_shortcodes.php,v $ -| $Revision: 1.3 $ -| $Date: 2009-07-25 07:54:35 $ +| $Revision: 1.4 $ +| $Date: 2009-08-23 10:57:51 $ | $Author: marj_nl_fr $ +----------------------------------------------------------------------------+ */ @@ -23,7 +23,16 @@ $comment_menu_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__); /* SC_BEGIN CM_ICON //TODO review bullet -return (defined("BULLET") ? "" : "bullet"); +$bullet = ''; +if(defined('BULLET')) +{ + $bullet = ''; +} +elseif(file_exists(THEME.'images/bullet2.gif')) +{ + $bullet = ''; +} +return $bullet; SC_END SC_BEGIN CM_DATESTAMP diff --git a/e107_plugins/content/content_shortcodes.php b/e107_plugins/content/content_shortcodes.php index c2c74a276..83593d5d7 100644 --- a/e107_plugins/content/content_shortcodes.php +++ b/e107_plugins/content/content_shortcodes.php @@ -880,12 +880,27 @@ SC_END SC_BEGIN CM_MENU_LINKS_ICON global $content_pref, $bullet; +//TODO review bullet + use switch //define icon - if($content_pref["content_menu_links_icon"] == "0"){ $ret = ""; - }elseif($content_pref["content_menu_links_icon"] == "1"){ $ret = $bullet; - }elseif($content_pref["content_menu_links_icon"] == "2"){ $ret = "·"; - }elseif($content_pref["content_menu_links_icon"] == "3"){ $ret = "º"; - }elseif($content_pref["content_menu_links_icon"] == "4"){ $ret = "»"; + if($content_pref["content_menu_links_icon"] == "0") + { + $ret = ""; + } + elseif($content_pref["content_menu_links_icon"] == "1") + { + $ret = $bullet; + } + elseif($content_pref["content_menu_links_icon"] == "2") + { + $ret = "·"; + } + elseif($content_pref["content_menu_links_icon"] == "3") + { + $ret = "º"; + } + elseif($content_pref["content_menu_links_icon"] == "4") + { + $ret = "»"; } return $ret; SC_END @@ -961,6 +976,7 @@ return ($content_pref["content_menu_cat_caption"] != "" ? $content_pref["content SC_END SC_BEGIN CM_MENU_CATEGORY_ICON +//TODO legacy bullet + use switch global $content_pref, $row, $bullet; $ret = ""; if($content_pref["content_menu_cat_icon"] == "0"){ $ret = ""; diff --git a/e107_plugins/content/handlers/content_class.php b/e107_plugins/content/handlers/content_class.php index 5fe1aa5c0..6123bbbef 100644 --- a/e107_plugins/content/handlers/content_class.php +++ b/e107_plugins/content/handlers/content_class.php @@ -12,9 +12,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/content/handlers/content_class.php,v $ -| $Revision: 1.22 $ -| $Date: 2007-04-18 21:41:58 $ -| $Author: lisa_ $ +| $Revision: 1.23 $ +| $Date: 2009-08-23 10:57:51 $ +| $Author: marj_nl_fr $ +---------------------------------------------------------------+ */ @@ -1413,9 +1413,18 @@ class content{ $data .= "global \$tp;\n"; $data .= "\n"; $data .= "include_lan(e_PLUGIN.'content/languages/'.e_LANGUAGE.'/lan_content.php');\n"; - $data .= "\n"; - $data .= "\$bullet = (defined('BULLET') ? \"\" : \"bullet\");\n"; - $data .= "\n"; + $data .= ' + $bullet = \'\'; + if(defined(\'BULLET\')) + { + $bullet = \'\'; + } + elseif(file_exists(THEME.\'images/bullet2.gif\')) + { + $bullet = \'\'; + } + '; + $data .= "\$content_pref = \$aa -> getContentPref(\$menutypeid, true);\n"; $data .= "\n"; $data .= "// load the template --------------------------------------------------\n"; diff --git a/e107_plugins/forum/newforumposts_menu.php b/e107_plugins/forum/newforumposts_menu.php index 6a5ee9d64..c9fb7953b 100755 --- a/e107_plugins/forum/newforumposts_menu.php +++ b/e107_plugins/forum/newforumposts_menu.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/forum/newforumposts_menu.php,v $ -| $Revision: 1.7 $ -| $Date: 2008-12-07 00:21:21 $ -| $Author: mcfly_e107 $ +| $Revision: 1.8 $ +| $Date: 2009-08-23 10:57:51 $ +| $Author: marj_nl_fr $ +----------------------------------------------------------------------------+ */ if (!defined('e107_INIT')) { exit; } @@ -68,7 +68,8 @@ if($results = $e107->sql->db_Select_gen($qry)) $post = $e107->tp->text_truncate($post, $menu_pref['newforumposts_characters'], $menu_pref['newforumposts_postfix']); $url = $e107->url->getUrl('forum', 'thread', array('func' => 'last', 'id' => $id)); - $bullet = ""; + //TODO legacy bullet is not use here anymore + //$bullet = ""; if ($menu_pref['newforumposts_title']) diff --git a/e107_plugins/links_page/link_menu.php b/e107_plugins/links_page/link_menu.php index f9cff4d55..cbfc279cc 100644 --- a/e107_plugins/links_page/link_menu.php +++ b/e107_plugins/links_page/link_menu.php @@ -16,7 +16,16 @@ global $tp; include_lan(e_PLUGIN."links_page/languages/".e_LANGUAGE.".php"); //TODO review bullet -$bullet = ""; +$bullet = ''; +if(defined('BULLET')) +{ + $bullet = ''; +} +elseif(file_exists(THEME.'images/bullet2.gif')) +{ + $bullet = ''; +} + global $linkspage_pref; $linkspage_pref = $lc -> getLinksPagePref(); diff --git a/e107_plugins/links_page/link_shortcodes.php b/e107_plugins/links_page/link_shortcodes.php index c8c05d62c..651a27666 100644 --- a/e107_plugins/links_page/link_shortcodes.php +++ b/e107_plugins/links_page/link_shortcodes.php @@ -155,35 +155,59 @@ SC_END SC_BEGIN LINK_MAIN_ICON global $LINK_MAIN_ICON, $rowl, $linkspage_pref; $LINK_MAIN_ICON = ""; -if(isset($linkspage_pref['link_cat_icon']) && $linkspage_pref['link_cat_icon']){ - if (isset($rowl['link_category_icon']) && $rowl['link_category_icon']) { - if(strstr($rowl['link_category_icon'], "/")){ - if(file_exists(e_BASE.$rowl['link_category_icon'])){ - $LINK_MAIN_ICON = ""; - } else { - if(isset($linkspage_pref['link_cat_icon_empty']) && $linkspage_pref['link_cat_icon_empty']){ - //TODO review bullet - $LINK_MAIN_ICON = ""; - } +$bullet = ''; +if(defined('BULLET')) +{ + $bullet = ''; +} +elseif(file_exists(THEME.'images/bullet2.gif')) +{ + $bullet = ''; +} + +if(isset($linkspage_pref['link_cat_icon']) && $linkspage_pref['link_cat_icon']) +{ + if (isset($rowl['link_category_icon']) && $rowl['link_category_icon']) + { + if(strstr($rowl['link_category_icon'], "/")) + { + if(file_exists(e_BASE.$rowl['link_category_icon'])) + { + $LINK_MAIN_ICON = ""; } - }else{ - if(file_exists(e_PLUGIN."links_page/cat_images/".$rowl['link_category_icon'])){ - $LINK_MAIN_ICON = ""; - } else { - if(isset($linkspage_pref['link_cat_icon_empty']) && $linkspage_pref['link_cat_icon_empty']){ - //TODO review bullet - $LINK_MAIN_ICON = ""; + else + { + if(isset($linkspage_pref['link_cat_icon_empty']) && $linkspage_pref['link_cat_icon_empty']) + { + $LINK_MAIN_ICON = $bullet; } } } - } else { - if(isset($linkspage_pref['link_cat_icon_empty']) && $linkspage_pref['link_cat_icon_empty']){ - //TODO review bullet - $LINK_MAIN_ICON = ""; + else + { + if(file_exists(e_PLUGIN."links_page/cat_images/".$rowl['link_category_icon'])) + { + $LINK_MAIN_ICON = ""; + } + else + { + if(isset($linkspage_pref['link_cat_icon_empty']) && $linkspage_pref['link_cat_icon_empty']) + { + $LINK_MAIN_ICON = $bullet; + } + } } } - if($rowl['total_links'] && $LINK_MAIN_ICON){ - $LINK_MAIN_ICON = "".$LINK_MAIN_ICON.""; + else + { + if(isset($linkspage_pref['link_cat_icon_empty']) && $linkspage_pref['link_cat_icon_empty']) + { + $LINK_MAIN_ICON = $bullet; + } + } + if($rowl['total_links'] && $LINK_MAIN_ICON) + { + $LINK_MAIN_ICON = "".$LINK_MAIN_ICON.""; } } return $LINK_MAIN_ICON; diff --git a/e107_plugins/list_new/list_class.php b/e107_plugins/list_new/list_class.php index 7add91e44..9a6505b57 100644 --- a/e107_plugins/list_new/list_class.php +++ b/e107_plugins/list_new/list_class.php @@ -9,8 +9,8 @@ * List Class * * $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_class.php,v $ - * $Revision: 1.10 $ - * $Date: 2009-08-15 11:55:30 $ + * $Revision: 1.11 $ + * $Date: 2009-08-23 10:57:51 $ * $Author: marj_nl_fr $ * */ @@ -609,9 +609,13 @@ class listclass if($this->list_pref[$this->mode."_icon_default"]) { - if(is_readable(THEME."images/bullet2.gif")) + if(defined('BULLET')) { - $default_bullet = ""; + $default_bullet = ''; + } + elseif(file_exists(THEME.'images/bullet2.gif')) + { + $default_bullet = ''; } } diff --git a/e107_plugins/login_menu/login_menu.php b/e107_plugins/login_menu/login_menu.php index 1c60c47cf..095f0d92a 100644 --- a/e107_plugins/login_menu/login_menu.php +++ b/e107_plugins/login_menu/login_menu.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/login_menu/login_menu.php,v $ -| $Revision: 1.10 $ -| $Date: 2008-06-13 20:20:22 $ -| $Author: e107steved $ +| $Revision: 1.11 $ +| $Date: 2009-08-23 10:57:51 $ +| $Author: marj_nl_fr $ +----------------------------------------------------------------------------+ */ @@ -34,12 +34,12 @@ $ip = $e107->getip(); //Bullet if(defined("BULLET")) { - $bullet = ""; + $bullet = ""; $bullet_src = THEME_ABS."images/".BULLET; } elseif(file_exists(THEME."images/bullet2.gif")) { - $bullet = "bullet"; + $bullet = "bullet"; $bullet_src = THEME_ABS."images/bullet2.gif"; } else diff --git a/e107_plugins/login_menu/login_menu_shortcodes.php b/e107_plugins/login_menu/login_menu_shortcodes.php index 90fafb498..2dfd3a764 100755 --- a/e107_plugins/login_menu/login_menu_shortcodes.php +++ b/e107_plugins/login_menu/login_menu_shortcodes.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/login_menu/login_menu_shortcodes.php,v $ -| $Revision: 1.7 $ -| $Date: 2009-03-06 20:09:08 $ -| $Author: e107coders $ +| $Revision: 1.8 $ +| $Date: 2009-08-23 10:57:51 $ +| $Author: marj_nl_fr $ +----------------------------------------------------------------------------+ */ if (!defined('e107_INIT')) { exit; } @@ -139,8 +139,9 @@ return ''; SC_END SC_BEGIN LM_ADMINLINK_BULLET -$data = getcachedvars('login_menu_data'); -if(ADMIN==TRUE){ +if(ADMIN) +{ + $data = getcachedvars('login_menu_data'); return $parm == 'src' ? $data['link_bullet_src'] : $data['link_bullet']; } return ''; diff --git a/page.php b/page.php index 62bcf837a..93f108fab 100644 --- a/page.php +++ b/page.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/page.php,v $ -| $Revision: 1.19 $ -| $Date: 2009-07-14 05:31:57 $ -| $Author: e107coders $ +| $Revision: 1.20 $ +| $Date: 2009-08-23 10:57:50 $ +| $Author: marj_nl_fr $ | +----------------------------------------------------------------------------+ */ @@ -111,18 +111,14 @@ class pageClass $this -> pageID = intval($tmp[0]); $this -> pageSelected = (isset($tmp[1]) ? intval($tmp[1]) : 0); $this -> pageTitles = array(); - if(defined("BULLET")) + $this->bullet = ''; + if(defined('BULLET')) { - $this -> bullet = ""; + $this->bullet = ''; } - elseif(file_exists(THEME."images/bullet2.gif")) + elseif(file_exists(THEME.'images/bullet2.gif')) { - $this -> bullet = "bullet"; - - } - else - { - $this -> bullet = ""; + $this->bullet = ''; } $this -> debug = $debug; diff --git a/userposts.php b/userposts.php index 7fc0b8854..736dc5ada 100644 --- a/userposts.php +++ b/userposts.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/userposts.php,v $ -| $Revision: 1.10 $ -| $Date: 2009-07-14 05:31:57 $ -| $Author: e107coders $ +| $Revision: 1.11 $ +| $Date: 2009-08-23 10:57:50 $ +| $Author: marj_nl_fr $ +----------------------------------------------------------------------------+ */ require_once('class2.php'); @@ -44,11 +44,6 @@ if ($action == 'exit') exit; } -if(!defined("BULLET")) -{ - define("BULLET", "bullet2.gif"); -} - if ($action == "comments") { if(is_numeric($id)) @@ -221,7 +216,16 @@ function parse_userposts_comments_table($row) $gen = new convert; $datestamp = $gen->convert_date($row['comment_datestamp'], "short"); - $USERPOSTS_COMMENTS_ICON = ""; + $bullet = ''; + if(defined('BULLET')) + { + $bullet = ''; + } + elseif(file_exists(THEME.'images/bullet2.gif')) + { + $bullet = ''; + } + $USERPOSTS_COMMENTS_ICON = $bullet; $USERPOSTS_COMMENTS_DATESTAMP = UP_LAN_11." ".$datestamp; $USERPOSTS_COMMENTS_HEADING = $row['comment_title']; $USERPOSTS_COMMENTS_COMMENT = $row['comment_comment'];