diff --git a/wbce/modules/topics/add.php b/wbce/modules/topics/add.php index 254ff98a7..09f8a124e 100644 --- a/wbce/modules/topics/add.php +++ b/wbce/modules/topics/add.php @@ -72,27 +72,13 @@ } $theq = "INSERT INTO ".TABLE_PREFIX."mod_".$mod_dir."_settings SET "; - $theq .= "section_id='".$section_id."', page_id='".$page_id."', section_title='".$section_title."' ". $addstring; - //echo $theq; - //die(); + $theq .= "section_id='".$section_id."', page_id='".$page_id."', section_title='".$section_title."' ". $addstring; + $database->query($theq); } else { $theq = "INSERT INTO ".TABLE_PREFIX."mod_".$tablename."_settings (section_id,page_id,section_title,section_description,sort_topics,use_timebased_publishing,picture_dir,header,topics_loop,footer,topics_per_page,topic_header,topic_footer,topic_block2,pnsa_string,pnsa_max,comments_header,comments_loop,comments_footer,commenting,default_link,use_captcha,sort_comments) VALUES ('$section_id','$page_id','$section_title','','$sort_topics','$use_timebased_publishing','$picture_dir','$header','$topics_loop','$footer','$topics_per_page','$topic_header','$topic_footer','$topic_block2','$pnsa_string','$pnsa_max','$comments_header','$comments_loop','$comments_footer','$commenting','$default_link','$use_captcha','$sort_comments')"; + $database->query($theq); include('defaults/first-topics.php'); } -$database->query($theq); - -$test = WB_PATH.substr($topics_directory, 0, -1); -//Add a frirst topic -if (isset($firsttopic) AND is_dir($test) ) { - $database->query($firsttopic); - // Get the id - $topic_id = $database->get_one("SELECT LAST_INSERT_ID()"); - - $filename = WB_PATH.$topics_directory.'welcome'.PAGE_EXTENSION; - define('TOPICS_DIRECTORY_DEPTH', $topics_directory_depth); - topics_archive_file ($filename, $topic_id, $section_id, $page_id, $create_topics_accessfiles); - -} ?> diff --git a/wbce/modules/topics/add_topic.php b/wbce/modules/topics/add_topic.php index d83b5e8d9..51827d22c 100644 --- a/wbce/modules/topics/add_topic.php +++ b/wbce/modules/topics/add_topic.php @@ -4,11 +4,11 @@ require('permissioncheck.php'); $mpath = WB_PATH.'/modules/'.$mod_dir.'/'; -require_once($mpath.'defaults/module_settings.default.php'); -require_once($mpath.'module_settings.php'); +//require_once($mpath.'defaults/module_settings.default.php'); +//require_once($mpath.'module_settings.php'); // Include the ordering class -require_once(WB_PATH.'/framework/class.order.php'); +require(WB_PATH.'/framework/class.order.php'); // Get new order $order = new order(TABLE_PREFIX.'mod_'.$tablename, 'position', 'topic_id', 'section_id'); $position = $order->get_new($section_id); @@ -41,4 +41,4 @@ $admin->print_footer(); } -?> +?> \ No newline at end of file diff --git a/wbce/modules/topics/assistant/assistant.inc.php b/wbce/modules/topics/assistant/assistant.inc.php new file mode 100644 index 000000000..25fb200f0 --- /dev/null +++ b/wbce/modules/topics/assistant/assistant.inc.php @@ -0,0 +1,23 @@ +Overview Presets:
'; +$Arr = array('ov_standard','ov_grid2_thumb','ov_grid3_thumb','ov_grid2_pic','ov_grid3_pic','ov_grid4_pic','ov_collector_sidebar'); +foreach($Arr as $pr) { + echo '  '; +} + +echo 'Topic Presets:
'; +$Arr = array('tp_standard','tp_simple','tp_simple_wide'); +foreach($Arr as $pr) { + echo '  '; +} + +echo 'Prev/Next:
'; +$Arr = array('pnsa_standard', 'pnsa_standard-en'); +foreach($Arr as $pr) { + echo '  '; +} + +echo ''; +?> \ No newline at end of file diff --git a/wbce/modules/topics/assistant/ov_collector_sidebar.js b/wbce/modules/topics/assistant/ov_collector_sidebar.js new file mode 100644 index 000000000..a5ad702ff --- /dev/null +++ b/wbce/modules/topics/assistant/ov_collector_sidebar.js @@ -0,0 +1,17 @@ +//Starting Javascript + +document.modify.header.value = '\n

Latest Topics

\n'; +document.modify.topics_loop.value = '[THUMB]\n[TITLE]
\n[SHORT_DESCRIPTION]\n\n
'; +document.modify.footer.value = ''; + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.header.style.backgroundColor = '#e8ff98'; +document.modify.topics_loop.style.backgroundColor = '#e8ff98'; +document.modify.footer.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea3').style.backgroundColor = '#e8ff98'; +showtabarea(3); + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/ov_collector_sidebar.png b/wbce/modules/topics/assistant/ov_collector_sidebar.png new file mode 100644 index 000000000..43bc336f2 Binary files /dev/null and b/wbce/modules/topics/assistant/ov_collector_sidebar.png differ diff --git a/wbce/modules/topics/assistant/ov_grid2_pic.js b/wbce/modules/topics/assistant/ov_grid2_pic.js new file mode 100644 index 000000000..86ae9841c --- /dev/null +++ b/wbce/modules/topics/assistant/ov_grid2_pic.js @@ -0,0 +1,20 @@ +//Starting Javascript + +document.modify.header.value = '\n

[SECTION_TITLE]

\n
\n
\n'; +document.modify.topics_loop.value = '
\n\n\n
\n

{TITLE}

[TOPIC_SHORT]\n
\n[EDITLINK]
\n'; +document.modify.footer.value = '
\n{PREV_NEXT_PAGES}\n
\n
\n'; + + + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.header.style.backgroundColor = '#e8ff98'; +document.modify.topics_loop.style.backgroundColor = '#e8ff98'; +document.modify.footer.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea3').style.backgroundColor = '#e8ff98'; +showtabarea(3); + + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/ov_grid2_pic.png b/wbce/modules/topics/assistant/ov_grid2_pic.png new file mode 100644 index 000000000..e40eb1f90 Binary files /dev/null and b/wbce/modules/topics/assistant/ov_grid2_pic.png differ diff --git a/wbce/modules/topics/assistant/ov_grid2_thumb.js b/wbce/modules/topics/assistant/ov_grid2_thumb.js new file mode 100644 index 000000000..291c58f0a --- /dev/null +++ b/wbce/modules/topics/assistant/ov_grid2_thumb.js @@ -0,0 +1,20 @@ +//Starting Javascript + +document.modify.header.value = '\n

[SECTION_TITLE]

\n
\n
\n'; +document.modify.topics_loop.value = '
\n{THUMB}\n
\n

{TITLE}

[TOPIC_SHORT]\n[READ_MORE]\n
\n[EDITLINK]
\n'; +document.modify.footer.value = '
\n{PREV_NEXT_PAGES}\n
\n
\n'; + + + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.header.style.backgroundColor = '#e8ff98'; +document.modify.topics_loop.style.backgroundColor = '#e8ff98'; +document.modify.footer.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea3').style.backgroundColor = '#e8ff98'; +showtabarea(3); + + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/ov_grid2_thumb.png b/wbce/modules/topics/assistant/ov_grid2_thumb.png new file mode 100644 index 000000000..9d9fa8abe Binary files /dev/null and b/wbce/modules/topics/assistant/ov_grid2_thumb.png differ diff --git a/wbce/modules/topics/assistant/ov_grid3_pic.js b/wbce/modules/topics/assistant/ov_grid3_pic.js new file mode 100644 index 000000000..a0b2a3e85 --- /dev/null +++ b/wbce/modules/topics/assistant/ov_grid3_pic.js @@ -0,0 +1,19 @@ +//Starting Javascript + +document.modify.header.value = '\n\n\n\n

[SECTION_TITLE]

\n
\n
\n'; +document.modify.topics_loop.value = '\n
\n\n\n
\n

{TITLE}

[TOPIC_SHORT]\n
\n[EDITLINK]
\n'; +document.modify.footer.value = '
\n{PREV_NEXT_PAGES}\n
\n
\n'; + + + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.header.style.backgroundColor = '#e8ff98'; +document.modify.topics_loop.style.backgroundColor = '#e8ff98'; +document.modify.footer.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea3').style.backgroundColor = '#e8ff98'; +showtabarea(3); + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/ov_grid3_pic.png b/wbce/modules/topics/assistant/ov_grid3_pic.png new file mode 100644 index 000000000..25033e720 Binary files /dev/null and b/wbce/modules/topics/assistant/ov_grid3_pic.png differ diff --git a/wbce/modules/topics/assistant/ov_grid3_thumb.js b/wbce/modules/topics/assistant/ov_grid3_thumb.js new file mode 100644 index 000000000..b234197c3 --- /dev/null +++ b/wbce/modules/topics/assistant/ov_grid3_thumb.js @@ -0,0 +1,20 @@ +//Starting Javascript + +document.modify.header.value = '\n

[SECTION_TITLE]

\n
\n
\n'; +document.modify.topics_loop.value = '
\n{THUMB}\n
\n

{TITLE}

[TOPIC_SHORT]\n[READ_MORE]\n
\n[EDITLINK]
\n'; +document.modify.footer.value = '
\n{PREV_NEXT_PAGES}\n
\n
\n'; + + + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.header.style.backgroundColor = '#e8ff98'; +document.modify.topics_loop.style.backgroundColor = '#e8ff98'; +document.modify.footer.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea3').style.backgroundColor = '#e8ff98'; +showtabarea(3); + + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/ov_grid3_thumb.png b/wbce/modules/topics/assistant/ov_grid3_thumb.png new file mode 100644 index 000000000..b625d279b Binary files /dev/null and b/wbce/modules/topics/assistant/ov_grid3_thumb.png differ diff --git a/wbce/modules/topics/assistant/ov_grid4_pic.js b/wbce/modules/topics/assistant/ov_grid4_pic.js new file mode 100644 index 000000000..7a7bf4f83 --- /dev/null +++ b/wbce/modules/topics/assistant/ov_grid4_pic.js @@ -0,0 +1,19 @@ +//Starting Javascript + +document.modify.header.value = '\n\n\n\n

[SECTION_TITLE]

\n
\n
\n'; +document.modify.topics_loop.value = '\n
\n\n\n
\n

{TITLE}

[TOPIC_SHORT]\n
\n[EDITLINK]
\n'; +document.modify.footer.value = '
\n{PREV_NEXT_PAGES}\n
\n
\n'; + + + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.header.style.backgroundColor = '#e8ff98'; +document.modify.topics_loop.style.backgroundColor = '#e8ff98'; +document.modify.footer.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea3').style.backgroundColor = '#e8ff98'; +showtabarea(3); + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/ov_grid4_pic.png b/wbce/modules/topics/assistant/ov_grid4_pic.png new file mode 100644 index 000000000..52793b761 Binary files /dev/null and b/wbce/modules/topics/assistant/ov_grid4_pic.png differ diff --git a/wbce/modules/topics/assistant/ov_grid4_thumb.png b/wbce/modules/topics/assistant/ov_grid4_thumb.png new file mode 100644 index 000000000..54de33c14 Binary files /dev/null and b/wbce/modules/topics/assistant/ov_grid4_thumb.png differ diff --git a/wbce/modules/topics/assistant/ov_standard.js b/wbce/modules/topics/assistant/ov_standard.js new file mode 100644 index 000000000..15f9c78b3 --- /dev/null +++ b/wbce/modules/topics/assistant/ov_standard.js @@ -0,0 +1,17 @@ +//Starting Javascript + +document.modify.header.value = '\n

[SECTION_TITLE]

\n'; +document.modify.topics_loop.value = '
\n{THUMB}\n

{TITLE}

\n[TOPIC_SHORT]\n[READ_MORE][EDITLINK]
\n
\n'; +document.modify.footer.value = '{PREV_NEXT_PAGES}\n'; + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.header.style.backgroundColor = '#e8ff98'; +document.modify.topics_loop.style.backgroundColor = '#e8ff98'; +document.modify.footer.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea3').style.backgroundColor = '#e8ff98'; +showtabarea(3); + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/ov_standard.png b/wbce/modules/topics/assistant/ov_standard.png new file mode 100644 index 000000000..abda4f916 Binary files /dev/null and b/wbce/modules/topics/assistant/ov_standard.png differ diff --git a/wbce/modules/topics/assistant/pnsa_standard-en.js b/wbce/modules/topics/assistant/pnsa_standard-en.js new file mode 100644 index 000000000..4a0494d1c --- /dev/null +++ b/wbce/modules/topics/assistant/pnsa_standard-en.js @@ -0,0 +1,24 @@ +//Starting Javascript +selectDropdownOption (document.modify.pnsa_max, 4); +document.modify.see_also_link_title.value = '

See also:

'; +document.modify.next_link_title.value = '

Newer Topics:

'; +document.modify.previous_link_title.value = '

Older Topics:

'; +document.modify.pnsa_string.value = '[THUMB]\n[TITLE]
\n[SHORT_DESCRIPTION]\n\n
\n'; +document.modify.sa_string.value = '[THUMB]\n[TITLE]
\n[SHORT_DESCRIPTION]\n\n
\n'; + + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.pnsa_max.style.backgroundColor = '#e8ff98'; +document.modify.see_also_link_title.style.backgroundColor = '#e8ff98'; +document.modify.next_link_title.style.backgroundColor = '#e8ff98'; +document.modify.previous_link_title.style.backgroundColor = '#e8ff98'; +document.modify.pnsa_string.style.backgroundColor = '#e8ff98'; +document.modify.sa_string.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea5').style.backgroundColor = '#e8ff98'; + +showtabarea(5); + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/pnsa_standard-en.png b/wbce/modules/topics/assistant/pnsa_standard-en.png new file mode 100644 index 000000000..1c9673142 Binary files /dev/null and b/wbce/modules/topics/assistant/pnsa_standard-en.png differ diff --git a/wbce/modules/topics/assistant/pnsa_standard.js b/wbce/modules/topics/assistant/pnsa_standard.js new file mode 100644 index 000000000..ddf647792 --- /dev/null +++ b/wbce/modules/topics/assistant/pnsa_standard.js @@ -0,0 +1,24 @@ +//Starting Javascript +selectDropdownOption (document.modify.pnsa_max, 4); +document.modify.see_also_link_title.value = '

Siehe auch:

'; +document.modify.next_link_title.value = '

Neuere Themen:

'; +document.modify.previous_link_title.value = '

Ältere Themen:

'; +document.modify.pnsa_string.value = '[THUMB]\n[TITLE]
\n[SHORT_DESCRIPTION]\n\n
\n'; +document.modify.sa_string.value = '[THUMB]\n[TITLE]
\n[SHORT_DESCRIPTION]\n\n
\n'; + + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.pnsa_max.style.backgroundColor = '#e8ff98'; +document.modify.see_also_link_title.style.backgroundColor = '#e8ff98'; +document.modify.next_link_title.style.backgroundColor = '#e8ff98'; +document.modify.previous_link_title.style.backgroundColor = '#e8ff98'; +document.modify.pnsa_string.style.backgroundColor = '#e8ff98'; +document.modify.sa_string.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea5').style.backgroundColor = '#e8ff98'; + +showtabarea(5); + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/pnsa_standard.png b/wbce/modules/topics/assistant/pnsa_standard.png new file mode 100644 index 000000000..31d9de2e1 Binary files /dev/null and b/wbce/modules/topics/assistant/pnsa_standard.png differ diff --git a/wbce/modules/topics/assistant/presets.psd b/wbce/modules/topics/assistant/presets.psd new file mode 100644 index 000000000..48dcb60b6 Binary files /dev/null and b/wbce/modules/topics/assistant/presets.psd differ diff --git a/wbce/modules/topics/assistant/tp_simple.js b/wbce/modules/topics/assistant/tp_simple.js new file mode 100644 index 000000000..69d114137 --- /dev/null +++ b/wbce/modules/topics/assistant/tp_simple.js @@ -0,0 +1,17 @@ +//Starting Javascript +document.modify.topic_header.value = '\n
\n

[TITLE]

\n
{PICTURE}[TOPIC_SHORT]
\n'; +document.modify.topic_footer.value = '
\n{SEE_ALSO}\n{SEE_PREVNEXT}\n
\n

Back

\n[EDITLINK]\n
\n'; +document.modify.topic_block2.value = ''; + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.topic_header.style.backgroundColor = '#e8ff98'; +document.modify.topic_footer.style.backgroundColor = '#e8ff98'; +document.modify.topic_block2.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea4').style.backgroundColor = '#e8ff98'; +showtabarea(4); + + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/tp_simple.png b/wbce/modules/topics/assistant/tp_simple.png new file mode 100644 index 000000000..e017a17d3 Binary files /dev/null and b/wbce/modules/topics/assistant/tp_simple.png differ diff --git a/wbce/modules/topics/assistant/tp_simple_wide.js b/wbce/modules/topics/assistant/tp_simple_wide.js new file mode 100644 index 000000000..bb222a233 --- /dev/null +++ b/wbce/modules/topics/assistant/tp_simple_wide.js @@ -0,0 +1,17 @@ +//Starting Javascript +document.modify.topic_header.value = '\n
\n

[TITLE]

\n
{THUMB}[TOPIC_SHORT]
\n
'; +document.modify.topic_footer.value = '[ADDITIONAL_PICTURES]\n
\n{SEE_ALSO}\n{SEE_PREVNEXT}\n
\n

Back

\n[EDITLINK]\n
\n'; +document.modify.topic_block2.value = ''; + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.topic_header.style.backgroundColor = '#e8ff98'; +document.modify.topic_footer.style.backgroundColor = '#e8ff98'; +document.modify.topic_block2.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea4').style.backgroundColor = '#e8ff98'; +showtabarea(4); + + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/tp_simple_wide.png b/wbce/modules/topics/assistant/tp_simple_wide.png new file mode 100644 index 000000000..58cf84715 Binary files /dev/null and b/wbce/modules/topics/assistant/tp_simple_wide.png differ diff --git a/wbce/modules/topics/assistant/tp_standard.js b/wbce/modules/topics/assistant/tp_standard.js new file mode 100644 index 000000000..c6f679efa --- /dev/null +++ b/wbce/modules/topics/assistant/tp_standard.js @@ -0,0 +1,19 @@ +//Starting Javascript +document.modify.topic_header.value = '\n
\n

[TITLE]

\n

[USER_DISPLAY_NAME] ([USER_NAME]) on [PUBL_DATE]

\n[USER_MODIFIEDINFO]\n
{PICTURE}[TOPIC_SHORT]
\n
\n[ADDITIONAL_PICTURES]\n'; +document.modify.topic_footer.value = '
\n{SEE_ALSO}{SEE_PREVNEXT}\n
\n

Back

\n[EDITLINK]\n
\n'; +document.modify.topic_block2.value = '\n
\n{PICTURE}\n[TOPIC_SHORT]\n{SEE_ALSO}{SEE_PREVNEXT}\n
\n'; + + + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.topic_header.style.backgroundColor = '#e8ff98'; +document.modify.topic_footer.style.backgroundColor = '#e8ff98'; +document.modify.topic_block2.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea4').style.backgroundColor = '#e8ff98'; +showtabarea(4); + + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/assistant/tp_standard.png b/wbce/modules/topics/assistant/tp_standard.png new file mode 100644 index 000000000..2c9ab7dfc Binary files /dev/null and b/wbce/modules/topics/assistant/tp_standard.png differ diff --git a/wbce/modules/topics/backend.css b/wbce/modules/topics/backend.css index d182908c0..e59d5f6d4 100644 --- a/wbce/modules/topics/backend.css +++ b/wbce/modules/topics/backend.css @@ -23,6 +23,7 @@ td { .tpfw30 {width:30%;} .tpfh30 {height:30px;} .tpfh60 {height:60px;} +.inputf.tpf-small {width:40px; margin-right:20px;} .mod_moduledirectory_edit_css {float:right;} @@ -86,6 +87,10 @@ a img {border:0;} .mod_topics_edit_css {display:inline; } +.assistantpresets td {padding: 0 0 0 5px; border-left: 1px solid #999; line-height:140%;} +.assistantpresets a {padding: 5px 5px 0 0; opacity:0.5; transition: 1s opacity;} +.assistantpresets a:hover {opacity:0.9; } + /*list Page*/ .topiclist-toptable {width:100%;} @@ -123,7 +128,7 @@ td .topicprops {width:150px;} .pnsa_links {width:100%;} .pnsa_links td.pn_links a {font-size:11px; font-weight:normal;} -/*Bei sehr großen Thumbs: Verkleinerung erzwingen*/ +/*Bei sehr groszen Thumbs: Verkleinerung erzwingen*/ .pnsa_links td.pn_links a img, .pnsa_links td.sa_links a img {max-width:50px; max-height:50px; clear:left; float:left; margin:0 5px 20px 0;} @@ -181,6 +186,8 @@ input.mod_topics_edit_css { #topics_picturechooser iframe {height:100%; width:100%; margin:0; padding:0; border:0;} .topicpic_preview_close {width:100%; height:20px; text-align:right; background-color:#ddd;} +.topicpic_preview_closebox {display:block; float:right; width:20px; height:20px; background: url(img/closebox.png) no-repeat;} + .topicpic_preview {float:left; margin:10px; width:140px; height:100px; overflow:hidden;} .topicpic_preview img {max-width:140px; border:0; text-align:center} diff --git a/wbce/modules/topics/backend.js b/wbce/modules/topics/backend.js index 0e07e3927..8eb18c8d4 100644 --- a/wbce/modules/topics/backend.js +++ b/wbce/modules/topics/backend.js @@ -3,10 +3,10 @@ innerw = 0.8*window.innerWidth; //if (innerh < 500) innerh = 500; //if (innerw < 768) innerw = 768; -var lastopentab = 0; +var lastopentab = 1; $( document ).ready(function() { - $( "body" ).append( '
close
'); + $( "body" ).append( '
'); document.getElementById('topics_picturechooser').style.height = innerh+"px"; document.getElementById('topics_chooser_overlay').style.width = innerw+"px"; @@ -74,9 +74,10 @@ function closeadditionalpictures () { /*--------- END NewUploader ---------------*/ function makevisible(what) { - document.getElementById(what).style.display="block"; - if (what != 'getfromtable' && document.getElementById("getfromtable")) document.getElementById("getfromtable").style.display="none"; - if (what != 'presetstable' && document.getElementById("presetstable")) document.getElementById("presetstable").style.display="none"; + document.getElementById("getfromtable").style.display="none"; + document.getElementById("presetstable").style.display="none"; + document.getElementById("assistant").style.display="none"; + document.getElementById(what).style.display="block"; } @@ -126,15 +127,20 @@ function changesettings(sid) { } -function changepresets(thefile) { +function changepresets(thefile, what) { - if (!thelanguage) {thelanguage = "en";} + var thelanguage = "en"; if( !document.createElement ) { alert('No createElement, sorry'); return; } - fn = 'presets-'+thelanguage+'/'+thefile+'.js'; + var d = new Date(); + var n = d.getMilliseconds(); + + fn = 'presets-'+thelanguage+'/'+thefile+'.js?t='+n; + if (what == 'as') {fn = 'assistant/'+thefile+'.js?t='+n;} + if (thefile.substr(0,3) == '../') {fn = thefile; } if (script) { @@ -264,20 +270,32 @@ function openpicturemodify(picfile) { //---------------------------------------------------------------- +function tp_changedmetafield(ths) { + var v = ths.value; + v = v.trim(); + v = v.replace(/(\r\n|\n|\r)/gm," "); + v = v.replace(/\s+/g," "); + if (ths.type = 'input') { + ths.value = v; + } else { + ths.text = v; + } + //alert(v); +} + function copythistopic() { document.getElementById('copytopic').value = 1; document.modify.submit(); } function showtabarea(nr) { - if (nr==0) { if (localStorage['topics_lastopentab'+section_id]) { lastopentab = parseInt( localStorage['topics_lastopentab'+section_id]); if (lastopentab > 0) {nr = lastopentab;} } } - if (nr==0) nr=1; + if (nr==0) {nr=1;} i=0; while (i < 7) { @@ -285,17 +303,10 @@ function showtabarea(nr) { nar = '#linktabarea'+i; if (i == nr) { - document.getElementById('tabarea'+i).style.display = "block"; - //document.getElementById('linktabarea'+i).style.borderBottom = "0"; - //document.getElementById('linktabarea'+i).style.backgroundColor = "#fff"; - $(nar).addClass( "activeTab" ); - - } else { - - document.getElementById('tabarea'+i).style.display = "none"; - if (document.getElementById('linktabarea'+i)) { - - } + document.getElementById('tabarea'+i).style.display = "block"; + $(nar).addClass( "activeTab" ); + } else { + document.getElementById('tabarea'+i).style.display = "none"; $(nar).removeClass( "activeTab" ); } } @@ -303,9 +314,10 @@ function showtabarea(nr) { localStorage.setItem('topics_lastopentab'+section_id, nr); $('.settingsform input, .settingsform textarea').css({"background-color": "none"}); - //window.localStorage.clear(); //try that + //window.localStorage.clear(); //testing } +/* function showtabareajQuery(nr) { //Funktioniert leider nicht n = '#tabarea'+lastopentab; @@ -321,5 +333,5 @@ function showtabareajQuery(nr) { lastopentab = nr; } - +*/ diff --git a/wbce/modules/topics/comments_ajax/comments.js b/wbce/modules/topics/comments_ajax/comments.js index 358d77d6e..0c380ba20 100644 --- a/wbce/modules/topics/comments_ajax/comments.js +++ b/wbce/modules/topics/comments_ajax/comments.js @@ -77,7 +77,7 @@ function validateForm() { } m = document.c_mment_form.themoil.value; - //if (m != '') { //Wenn vorhanden, dann muss gültig sein + //if (m != '') { //Wenn vorhanden, dann muss gueltig sein p1=m.indexOf('@'); p2=m.indexOf('.'); if (emailsettings > 1) { diff --git a/wbce/modules/topics/comments_iframe/comment.php b/wbce/modules/topics/comments_iframe/comment.php index be49aa533..0563ce8df 100644 --- a/wbce/modules/topics/comments_iframe/comment.php +++ b/wbce/modules/topics/comments_iframe/comment.php @@ -123,7 +123,7 @@ // Include index (wrapper) file //require(WB_PATH.'/index.php'); - //von Chio eingefügt + //von Chio eingefuegt require(WB_PATH.'/modules/'.$mod_dir.'/comments_iframe/commentframe.php'); diff --git a/wbce/modules/topics/comments_iframe/commentdone.php b/wbce/modules/topics/comments_iframe/commentdone.php index d9b0c8878..7ec1eefcf 100644 --- a/wbce/modules/topics/comments_iframe/commentdone.php +++ b/wbce/modules/topics/comments_iframe/commentdone.php @@ -122,7 +122,7 @@ function doresize() { $values = array($name, $comment['email'], $comment['website'], $thecomment, '', '', '0', '', '', $nameLink); $outputjs = str_replace($vars, $values, $setting_comments_loop); - $outputjs = preg_replace('/\s+/', ' ', $outputjs); //einzeilig für Javascript + $outputjs = preg_replace('/\s+/', ' ', $outputjs); //einzeilig fuer Javascript $outputjs = addslashes($outputjs); echo ' \ No newline at end of file diff --git a/wbce/modules/topics/extras/copy_news.inc.php b/wbce/modules/topics/extras/copy_news.inc.php index 8683772d1..f7b5275be 100644 --- a/wbce/modules/topics/extras/copy_news.inc.php +++ b/wbce/modules/topics/extras/copy_news.inc.php @@ -107,7 +107,7 @@ $position = $post['position']; $content_short = ''.$post['content_short']; $content_long = $post['content_long']; - //$short_description = $post['content_short']; //Wird nicht übertragen + //$short_description = $post['content_short']; //Wird nicht uebertragen $description = makemetadescription ( strip_tags($content_short . ' ' . $title) ); $keywords = makemetakeywords ( strtolower(strip_tags($title .' '.$content_short))); diff --git a/wbce/modules/topics/frontend.css b/wbce/modules/topics/frontend.css index e5403ae71..08f2af1f0 100644 --- a/wbce/modules/topics/frontend.css +++ b/wbce/modules/topics/frontend.css @@ -1,3 +1,7 @@ +/*simple basics*/ +.tp_pic {max-width:100%;} + + /* List Page */ .mod_topic_loop { margin-bottom:30px; @@ -40,10 +44,14 @@ Topic Page*/ .mod_topic_page .tp_date {float:right; color:#aaaaaa; font-size: 11px;} .mod_topic_page .tp_teaser {} /*[Short]*/ .mod_topic_page .tp_teaser img.tp_pic {max-width: 48%; float:left; margin:4px 4% 2px 0;} +.mod_topic_page .tp_teaser_right img.tp_pic {float:right; margin:4px 0 2px 4%;} .mod_topic_back {font-size: 14px; margin: 20px 0 0 0; font-weight: bold;} .mod_topic_edit {font-size: 14px; margin: 20px 0 0 0; font-weight: bold;} +.mod_topic_page .tp_teaser-mobile {display:none;} +.mod_topic_page .tp_teaser-mobile img {} + /*Previous, Next, Also see */ /*topic_block2*/ @@ -63,49 +71,30 @@ a.pnsa_block:hover {background: rgba(200, 200, 200, 0.2); padding: 5px 0 10px 0; .topic_block2 .tp_pic {max-width:100%;} -/*Responsive*/ -@media (max-width: 480px) { - .mod_topic_page .tp_teaser {margin-bottom:20px; padding-bottom:5px; border-bottom:1px #999 solid;} - .mod_topic_page .tp_teaser img.tp_pic {max-width: 100%; float:none; margin:0 0 2px 0;} -} /*topic_footer*/ .topic_footer {width:102%;} .topic_footer a.pnsa_block {float: left; width: 48%; min-width:220px; margin: 0 2% 10px 0; } .topic_footer a.pnsa_block:hover { padding: 0 0;} +/*footerpnsa*/ +.tp_footerpnsa {width:102%; clear:both; margin-top:30px;} +.tp_footerpnsa a.pnsa_block {width:48%; float:left; padding: 0 0; margin:0 2% 20px 0;} +.tp_footerpnsa.tp-blocks-3 {width:103%; } +.tp_footerpnsa.tp-blocks-3 a.pnsa_block {width:31%;margin:0 2% 20px 0;} -.additional_pictures {} + + +.additional_pictures {margin-top:10px;} .additional_pictures a {float:left; margin: 0 5px 5px 0;} /* .additional_pictures a img {height:100px;} */ /*Topic Comments*/ -.mod_topic_nocomments { - font-size: 11px; - color: #666666; -} -.mod_topic_commentbox { - XXborder: 0; - XXborder-bottom: 1px solid #666666; - XXwidth:100%; - XXmax-width: 400px; - XXmargin: 10px 0 10px 0; - XXpadding:10px; - XXbackground-color: #ffffff; -} - -.mod_topic_commentbox .comment_name { - margin:0; - font-weight: bold; -} - -.mod_topic_commentbox .comment_date {float:right; width:100px; text-align:right; - font-size: 10px; - color: #666666; - margin:0; -} - +.mod_topic_nocomments { font-size: 12px; color: #666666;} +.mod_topic_commentbox {} +.mod_topic_commentbox .comment_name {margin:0; font-weight: bold;} +.mod_topic_commentbox .comment_date {float:right; width:100px; text-align:right; font-size: 10px; color: #666666; margin:0;} .mod_topic_commentbox .comment_text {margin:3px 0; padding-top:5px; border-top: 1px dotted #666;} @@ -119,42 +108,17 @@ a.pnsa_block:hover {background: rgba(200, 200, 200, 0.2); padding: 5px 0 10px 0; /*Add Comments iFrame*/ .mod_topic_comment_iframe {width:90%; max-width: 400px; height: 450px;} -.mod_topic_add_comment { - /*font-family:"Century Gothic", "Trebuchet MS", "Arial Narrow", Arial, sans-serif; - color: #2872A6;*/ - font-size: 16px; - margin: 20px 0 0 5px; - font-weight: bold; -} +.mod_topic_add_comment {font-size: 16px; margin: 20px 0 0 5px; font-weight: bold;} /*Add Comment Frame*/ /*** Don't remove the class nixhier, this is required for ASP ***/ -.nixhier { - display:none; -} - -.topicsc_the_f { - font-size: 12px; - font-family: Arial, Helvetica, sans-serif; -} - -.topicsc_the_f p { - margin:4px 0; -} +.nixhier { display:none;} +.topicsc_the_f { font-size: 12px; font-family: Arial, Helvetica, sans-serif; } -.topicsc_the_f input , .topicsc_the_f textarea { - border: 1px solid #222222; width:90%;} +.topicsc_the_f p { margin:4px 0;} +.topicsc_the_f input , .topicsc_the_f textarea { border: 1px solid #222222; width:90%;} .topicsc_the_f textarea { height: 120px; font-size: 11px;} - - - - - -.topicsc_the_f td { - font-size: 12px; - font-weight: bold; - color: #000066; -} +.topicsc_the_f td { font-size: 12px; font-weight: bold; color: #000066;} /*--------------LastComments------------------*/ @@ -174,22 +138,34 @@ ul.topic_menu .tp_listactive {font-weight: bold; color:#000000;} /*Extras: -3 or 4 Blocks Overview +2, 3 or 4 Blocks Overview */ -.tp-blocks-3 {width:100%; overflow:hidden;} -.tp-blocks-3 .tp-blocks-inner {width:103%;} -.tp-blocks-3 .mod_topic_loop {float:left; width:30%; height: 340px; margin: 10px 3% 20px 0; } +.tp-blocks {width:100%; overflow:hidden;} +.tp-blocks h3, .tp-blocks p {margin:0;} + +.tp-blocks-3 .tp-blocks-inner {width:104.2%;} +.tp-blocks-3 .mod_topic_loop {float:left; width:30%; margin: 20px 3% 20px 0; } -.tp-blocks-4 {width:100%; overflow:hidden;} -.tp-blocks-4 .tp-blocks-inner {width:102%;} -.tp-blocks-4 .mod_topic_loop {float:left; width:23%; height: 340px; margin: 10px 2% 20px 0; } +.tp-blocks-2 .tp-blocks-inner, .tp-blocks-4 .tp-blocks-inner {width:102.1%;} +.tp-blocks-2 .mod_topic_loop {float:left; width:48%; margin: 10px 2% 20px 0; } +.tp-blocks-4 .mod_topic_loop {float:left; width:23%; margin: 10px 2% 20px 0; } -.tp-blocks-inner .mod_topic_loop .short_description {display:block; padding:5px 0; } -.tp-blocks-inner .mod_topic_loop a.loop-pic {display:block; width:100%; XXpadding-bottom:60%; background-size: 101% auto, auto; background-position: center, center; transition:0.5s all;} +.tp-blocks-inner .mod_topic_loop {border-bottom:0;} +.tp-blocks-inner .mod_topic_loop a.loop-pic {display:block; width:100%; margin-bottom:6px; background-size: 101% auto, auto; background-position: center, center; transition:0.5s all;} .tp-blocks-inner .mod_topic_loop a.loop-pic img {width:100%; float:left; opacity:1; transition:0.5s all;} .tp-blocks-inner .mod_topic_loop a.loop-pic span.miniclear {display:block; height:0; clear:both; } -.tp-blocks-inner .mod_topic_loop .textblock {height:120px; overflow:hidden; } +.tp-blocks-3 .mod_topic_loop .textblock {line-height:130%; padding-right:1%;} +.tp-blocks-3.tp_thumbsblock .mod_topic_loop .textblock_thumb {line-height:130%; padding-right:1%;} +.tp-blocks-3.tp_thumbsblock .mod_topic_loop .tp_thumb { margin-bottom: 5px; } + + +.tp-blocks-2 .tpcount2-1 {clear:left;} +.tp-blocks-3 .tpcount12-4, .tp-blocks-3 .tpcount12-7, .tp-blocks-3 .tpcount12-10, .tp-blocks-3 .tpcount12-1 {clear:left;} +.tp-blocks-4 .tpcount12-5, .tp-blocks-4 .tpcount12-9, .tp-blocks-4 .tpcount12-1 {clear:left;} + +/*ausnahmen*/ +.tp_content_wide .tp_thumb {float:left; max-width: 24%; margin:3px 2% 2px 0; } /*some effects:*/ @@ -197,18 +173,45 @@ ul.topic_menu .tp_listactive {font-weight: bold; color:#000000;} .tp-blocks-inner .mod_topic_loop a.loop-pic:hover {background-size: 140% auto, auto; } /*--------------Responsive------------------*/ -@media screen and (max-width: 800px) { - +@media screen and (max-width: 768px) { + + .tp-blocks-3 .tp-blocks-inner, .tp-blocks-4 .tp-blocks-inner {width:102%;} + .tp-blocks-4 .mod_topic_loop, .tp-blocks-3 .mod_topic_loop { width:47.8%; margin: 10px 2% 20px 0; } + + .tp-blocks-3 .tpcount12-4, .tp-blocks-3 .tpcount12-7, .tp-blocks-3 .tpcount12-10 {clear:none;} + .tp-blocks-3 .tpcount12-3, .tp-blocks-3 .tpcount12-5, .tp-blocks-3 .tpcount12-7, .tp-blocks-3 .tpcount12-9, .tp-blocks-3 .tpcount12-11 {clear:left;} + .tp-blocks-4 .tpcount12-3, .tp-blocks-4 .tpcount12-7, .tp-blocks-4 .tpcount12-9, .tp-blocks-4 .tpcount12-11 {clear:left;} - .tp-blocks-4 .mod_topic_loop { width:47.8%; } + .tp-blocks.tp_thumbsblock .tp-blocks-inner, .tp-blocks.tp_thumbsblock .mod_topic_loop {float:none; clear:both; width:100%; min-height: 20px; height: auto ! important; margin: 10px 0 10px 0; padding-bottom:10px;} + + .mod_topic_page .tp_teaser-mobile {display:block;} + .mod_topic_page .tp_teaser-mobile img {max-width:48%; float:left; margin:0 4% 0 0;} + + + /*footer*/ + .tp_footerpnsa.tp-blocks-3 {width:102%; } + .tp_footerpnsa.tp-blocks-3 a.pnsa_block {width:48%;} } @media screen and (max-width: 480px) { + .mod_topic_page .tp_teaser {margin-bottom:20px; padding-bottom:5px; border-bottom:1px #999 solid;} + .mod_topic_page .tp_teaser img.tp_pic {max-width: 100%; float:none; margin:0 0 2px 0;} - .tp-blocks-3 .tp-blocks-inner, .tp-blocks-4 .tp-blocks-inner {width:100%;} - .tp-blocks-3 .mod_topic_loop, .tp-blocks-4 .mod_topic_loop {float:none; width:100%; height: auto; margin: 10px 0 20px 0; } - .tp-blocks-inner .mod_topic_loop .textblock {height:auto; overflow:show; } + .tp-blocks-2 .tp-blocks-inner, .tp-blocks-3 .tp-blocks-inner, .tp-blocks-4 .tp-blocks-inner {width:100%;} + .tp-blocks-2 .mod_topic_loop, .tp-blocks-3 .mod_topic_loop, .tp-blocks-4 .mod_topic_loop {float:none; width:100%; min-height: 20px; height: auto ! important; margin: 10px 0 20px 0; padding-bottom:20px;} + .tp-blocks-inner .mod_topic_loop .textblock {height:auto ! important; } + + .mod_topic_page .tp_teaser-mobile img {max-width:100%;} + + .tp_content_wide .tp_pic {clear: both; float:none; width:100%; margin: 10px 0 10px 0 ! important; } + + /*footer*/ + .tp_footerpnsa, .tp_footerpnsa a.pnsa_block, .tp_footerpnsa.tp-blocks-3, .tp_footerpnsa.tp-blocks-3 a.pnsa_block {width:100%; float:none; margin-left:0;} + + .additional_pictures a {max-width:45%;} + .additional_pictures a img {max-width:100%;} + } diff --git a/wbce/modules/topics/functions.php b/wbce/modules/topics/functions.php index 8297f32ba..037aa8386 100644 --- a/wbce/modules/topics/functions.php +++ b/wbce/modules/topics/functions.php @@ -10,13 +10,12 @@ function makemetadescription ($thestring) { - $the_description = stripslashes($thestring); + $the_description = html_entity_decode(stripslashes($thestring)); $wsp = "\\x00-\\x20"; //all white-spaces and control chars $the_description = preg_replace( "/[".$wsp."]+/" , ' ', $the_description ); - $the_description = str_replace('"', ' ', $the_description); - $the_description = str_replace("'", ' ', $the_description); - $the_description = str_replace('\'', ' ', $the_description); + $bad = array('"', "'", '\'',' ',' ',' '); + $the_description = str_replace($bad, ' ', $the_description); if (strlen($the_description) > 160) { if(preg_match('/.{0,160}(?:[.!?:,])/su', $the_description, $match)) { $the_description = $match[0]; } //thanks to thorn @@ -25,23 +24,15 @@ function makemetadescription ($thestring) { if ($pos > 0) {$the_description = substr($the_description, 0, $pos); } } } - //$the_description = ' '.$the_description; - $the_description = trim(str_replace(' ',' ',$the_description)); - $the_description = trim(str_replace(' ',' ',$the_description)); - return (' '.$the_description); } function makemetakeywords ($thestring ) { - $the_keywords = $thestring; - if (strlen($the_keywords) > 100) { - if(preg_match('/.{0,100}(?:[.!?:,])/su', $the_keywords, $match)) { $the_keywords = $match[0]; } //thanks to thorn - if (strlen($the_keywords) > 100) { - $pos = strpos($the_keywords, " ", 100); - if ($pos > 0) {$the_keywords = substr($the_keywords, 0, $pos); } - } - } + $the_keywords = html_entity_decode(stripslashes($thestring)); + $wsp = "\\x00-\\x20"; //all white-spaces and control chars + $the_keywords = preg_replace( "/[".$wsp."]+/" , ' ', $the_keywords ); + $bad = array( '\'', /* / */ '"', /* " */ '<', /* < */ '>', /* > */ '{', /* { */ '}', /* } */ '[', /* [ */ ']', /* ] */ '`', /* ` */ @@ -51,9 +42,16 @@ function makemetakeywords ($thestring ) { ';', /* ; */ ':', /* : */ ' ', /* */ '.', /* . */ '?' /* ? */ ); $the_keywords = str_replace($bad, ',', $the_keywords); - $the_keywords = str_replace(',,,',',',$the_keywords); - $the_keywords = str_replace(',,',',',$the_keywords); - + $the_keywordsArr = explode(',',$the_keywords); + $the_keywordsArr2 = array(); $ksum = 0; + foreach ($the_keywordsArr as $k) { + if (strlen($k) < 4) {continue;} + if (in_array($k, $the_keywordsArr2)) {continue;} + $the_keywordsArr2[] = $k; + $ksum += strlen($k); + if ($ksum > 60) {break;} + } + $the_keywords = implode(', ',$the_keywordsArr2); return (' '.$the_keywords); } @@ -83,7 +81,7 @@ function topics_move_topic($movetopic) { $newpicture_dir = $sections_fetch['picture_dir']; if ($restrict2picdir > 0 AND $newpicture_dir != $picture_dir) { die('No Permission'); } - //Hier muss überprüft werden, ob der User überhaupt in die andere Section speichern darf. + //Hier muss ueberprueft werden, ob der User ueberhaupt in die andere Section speichern darf. if (!$admin->get_page_permission($sections_fetch['page_id'])) { die('No Permission'); } //------------------------------------------------------------ diff --git a/wbce/modules/topics/functions_small.php b/wbce/modules/topics/functions_small.php index 043eff3b4..cbd45bfa7 100644 --- a/wbce/modules/topics/functions_small.php +++ b/wbce/modules/topics/functions_small.php @@ -6,140 +6,139 @@ exit(0); } -function topics_localtime() { - //return time(); - return gmmktime ( (int) gmdate("H"), (int) gmdate("i"), (int) gmdate("s"), (int) gmdate("n"), (int) gmdate("j"), (int) gmdate("Y")) + DEFAULT_TIMEZONE; -} - -function topics_update_comments_count ($topic_id) { - global $database; - $mod_dir = basename(dirname(__FILE__)); - $tablename = $mod_dir; - - $theq = "SELECT * FROM ".TABLE_PREFIX."mod_".$tablename."_comments WHERE topic_id = '".$topic_id."' AND active>'0'"; - $query_comments = $database->query($theq); - $comments_count = $query_comments->numRows(); - - $theq = "UPDATE ".TABLE_PREFIX."mod_".$tablename." SET comments_count = '".$comments_count."' WHERE topic_id = '".$topic_id."'"; - $database->query($theq); - -} - - - -function topics_commentsclass ($comments_count) { - $commentsclass = 0; - if ($comments_count > 0) {$commentsclass = 1; - if ($comments_count > 2) {$commentsclass = 2; - if ($comments_count > 5) {$commentsclass = 3; - if ($comments_count > 8) {$commentsclass = 4;} +if (!function_exists('topics_localtime')) { + function topics_localtime() { + //return time(); + return gmmktime ( (int) gmdate("H"), (int) gmdate("i"), (int) gmdate("s"), (int) gmdate("n"), (int) gmdate("j"), (int) gmdate("Y")); // + DEFAULT_TIMEZONE; + } + + function topics_update_comments_count ($topic_id) { + global $database; + $mod_dir = basename(dirname(__FILE__)); + $tablename = $mod_dir; + + $theq = "SELECT * FROM ".TABLE_PREFIX."mod_".$tablename."_comments WHERE topic_id = '".$topic_id."' AND active>'0'"; + $query_comments = $database->query($theq); + $comments_count = $query_comments->numRows(); + + $theq = "UPDATE ".TABLE_PREFIX."mod_".$tablename." SET comments_count = '".$comments_count."' WHERE topic_id = '".$topic_id."'"; + $database->query($theq); + + } + + + + function topics_commentsclass ($comments_count) { + $commentsclass = 0; + if ($comments_count > 0) {$commentsclass = 1; + if ($comments_count > 2) {$commentsclass = 2; + if ($comments_count > 5) {$commentsclass = 3; + if ($comments_count > 8) {$commentsclass = 4;} + } } } + return $commentsclass; } - return $commentsclass; -} - -function get_sort_topics_by($sort_topics) { - - switch ($sort_topics) { - case 0: return(' position DESC'); - case 1: return(' published_when DESC, posted_first DESC'); - case 2: return(' topic_score DESC'); - case 3: return(' published_when ASC'); - case 4: return(' title ASC'); - - case -1: return(' position ASC'); - case -2: return(' published_when ASC, posted_first ASC'); - case -3: return(' topic_score ASC'); - case -4: return(' published_when DESC'); - case -5: return(' title DESC'); + + function get_sort_topics_by($sort_topics) { + + switch ($sort_topics) { + case 0: return(' position DESC'); + case 1: return(' published_when DESC, posted_first DESC'); + case 2: return(' topic_score DESC'); + case 3: return(' published_when ASC'); + case 4: return(' title ASC'); + + case -1: return(' position ASC'); + case -2: return(' published_when ASC, posted_first ASC'); + case -3: return(' topic_score ASC'); + case -4: return(' published_when DESC'); + case -5: return(' title DESC'); + } } -} - - - -function users_lowest_groupid() { - //obsolete? - global $database; - global $authorsgroup; - - if (!isset($_SESSION["GROUPS_ID"])) {return 0;}; - - //Das wird wohl einfacher gehen: - //In welcher (niedrigsten) Gruppe ist der aktuelle User? - //M�glicher Bug: Wie werden Groups > 9 sortiert? - - $checkstring = ','.$_SESSION ["GROUPS_ID"].','; - if (strpos($checkstring, ',1,') !== false) {return 1;} - - if ($authorsgroup > 0) { - if (strpos($checkstring, ','.$authorsgroup.',') !== false) {return $authorsgroup ;} - //Fallstrick: - //Ist autorgruppe=3 und und der aktuelle User in Gruppe 2 und 3, dann wird er trotzdem NUR als Autor gef�hrt. - + + + + function users_lowest_groupid() { + //obsolete? + global $database; + global $authorsgroup; + + if (!isset($_SESSION["GROUPS_ID"])) {return 0;}; + + //Das wird wohl einfacher gehen: + //In welcher (niedrigsten) Gruppe ist der aktuelle User? + //M�glicher Bug: Wie werden Groups > 9 sortiert? + + $checkstring = ','.$_SESSION ["GROUPS_ID"].','; + if (strpos($checkstring, ',1,') !== false) {return 1;} + + if ($authorsgroup > 0) { + if (strpos($checkstring, ','.$authorsgroup.',') !== false) {return $authorsgroup ;} + //Fallstrick: + //Ist autorgruppe=3 und und der aktuelle User in Gruppe 2 und 3, dann wird er trotzdem NUR als Autor gef�hrt. + + } + + return 0; } - - return 0; -} - -function topics_archive_file ($filename, $t_id, $s_id, $p_id, $create_topics_accessfiles = 0) { - if ($create_topics_accessfiles != 1) {return 0;} + function topics_archive_file ($filename, $t_id, $s_id, $p_id, $create_topics_accessfiles = 0) + { + if ($create_topics_accessfiles != 1) {return 0;} + + //global $topics_directory; + //global $topics_directory_depth; + //Asume, everything is alright if we came so far + //$filename = WB_PATH.$topics_directory.$link.PAGE_EXTENSION; + //echo $filename; + if (file_exists($filename)) { unlink($filename);} - //global $topics_directory; - //global $topics_directory_depth; - - //Asume, everything is alright if we came so far - //$filename = WB_PATH.$topics_directory.$link.PAGE_EXTENSION; - //echo $filename; - if (file_exists($filename)) { unlink($filename);} - - // Write to the filename - $content = ''; - $handle = fopen($filename, 'w'); - fwrite($handle, $content); - fclose($handle); + // Write to the filename + $content = 'Auto-archived: '.$link.'

'; + ?>'; + $handle = fopen($filename, 'w'); + fwrite($handle, $content); + fclose($handle); + //echo '

Auto-archived: '.$link.'

'; + } + + function topics_frontendfooter () { + echo '
'; + + } + + function get_any_sections ($section) { + global $database, $wb; + global $section_id, $page_id; + + $tpreal_section = $section_id; + $tpreal_page = $page_id; + + $theq = "SELECT module, page_id FROM ".TABLE_PREFIX."sections WHERE section_id = '$section'"; + $result = $database->query($theq); + if ($result->numRows() != 1) {return ("no valid section_id");} + + $fetch_result = $result->fetchRow(); + $page_id = $fetch_result['page_id']; + $section_id = $section; + + ob_start(); + include(WB_PATH.'/modules/'.$fetch_result['module'].'/view.php'); + $content=ob_get_contents(); + ob_end_clean(); + + $wb->preprocess($content); + return ($content); + } } - -function topics_frontendfooter () { - echo '
'; - -} - -function get_any_sections ($section) { - global $database, $wb; - global $section_id, $page_id; - - $tpreal_section = $section_id; - $tpreal_page = $page_id; - - $theq = "SELECT module, page_id FROM ".TABLE_PREFIX."sections WHERE section_id = '$section'"; - $result = $database->query($theq); - if ($result->numRows() != 1) {return ("no valid section_id");} - - $fetch_result = $result->fetchRow(); - $page_id = $fetch_result['page_id']; - $section_id = $section; - - ob_start(); - include(WB_PATH.'/modules/'.$fetch_result['module'].'/view.php'); - $content=ob_get_contents(); - ob_end_clean(); - - $wb->preprocess($content); - return ($content); -} - -?> +?> \ No newline at end of file diff --git a/wbce/modules/topics/getsettings.php b/wbce/modules/topics/getsettings.php index c25bc0135..4a75ddda3 100644 --- a/wbce/modules/topics/getsettings.php +++ b/wbce/modules/topics/getsettings.php @@ -1,5 +1,5 @@ 4 ) { echo "document.modify.see_also_link_title.value = '".$setting_pnsa_array[0]."';\n"; echo "document.modify.next_link_title.value = '".$setting_pnsa_array[1]."';\n"; @@ -150,7 +160,11 @@ } //6====================================================================================== - + + + echo ' +//comments: +'; //comments: echo 'selectDropdownOption (document.modify.commenting, '.$settings_fetch['commenting'].");\n"; echo 'selectDropdownOption (document.modify.default_link, '.$settings_fetch['default_link'].");\n"; diff --git a/wbce/modules/topics/img/shadow/closebox.png b/wbce/modules/topics/img/shadow/closebox.png deleted file mode 100644 index 4de4396d4..000000000 Binary files a/wbce/modules/topics/img/shadow/closebox.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/fancy_title_left.png b/wbce/modules/topics/img/shadow/fancy_title_left.png deleted file mode 100644 index 1e82b6da6..000000000 Binary files a/wbce/modules/topics/img/shadow/fancy_title_left.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/left.gif b/wbce/modules/topics/img/shadow/left.gif deleted file mode 100644 index 6fa38179e..000000000 Binary files a/wbce/modules/topics/img/shadow/left.gif and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/progress.png b/wbce/modules/topics/img/shadow/progress.png deleted file mode 100644 index 06b7c89a6..000000000 Binary files a/wbce/modules/topics/img/shadow/progress.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/right.gif b/wbce/modules/topics/img/shadow/right.gif deleted file mode 100644 index f838731dc..000000000 Binary files a/wbce/modules/topics/img/shadow/right.gif and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/shadow_e.png b/wbce/modules/topics/img/shadow/shadow_e.png deleted file mode 100644 index 5db7b2b82..000000000 Binary files a/wbce/modules/topics/img/shadow/shadow_e.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/shadow_n.png b/wbce/modules/topics/img/shadow/shadow_n.png deleted file mode 100644 index 4e20abbe7..000000000 Binary files a/wbce/modules/topics/img/shadow/shadow_n.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/shadow_ne.png b/wbce/modules/topics/img/shadow/shadow_ne.png deleted file mode 100644 index 64ef7225f..000000000 Binary files a/wbce/modules/topics/img/shadow/shadow_ne.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/shadow_nw.png b/wbce/modules/topics/img/shadow/shadow_nw.png deleted file mode 100644 index 9ef033770..000000000 Binary files a/wbce/modules/topics/img/shadow/shadow_nw.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/shadow_s.png b/wbce/modules/topics/img/shadow/shadow_s.png deleted file mode 100644 index bf52bd61a..000000000 Binary files a/wbce/modules/topics/img/shadow/shadow_s.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/shadow_se.png b/wbce/modules/topics/img/shadow/shadow_se.png deleted file mode 100644 index 12311ed36..000000000 Binary files a/wbce/modules/topics/img/shadow/shadow_se.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/shadow_sw.png b/wbce/modules/topics/img/shadow/shadow_sw.png deleted file mode 100644 index 923a8b50a..000000000 Binary files a/wbce/modules/topics/img/shadow/shadow_sw.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/shadow_w.png b/wbce/modules/topics/img/shadow/shadow_w.png deleted file mode 100644 index 6f808d3e9..000000000 Binary files a/wbce/modules/topics/img/shadow/shadow_w.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/title_main.png b/wbce/modules/topics/img/shadow/title_main.png deleted file mode 100644 index 5f505b00a..000000000 Binary files a/wbce/modules/topics/img/shadow/title_main.png and /dev/null differ diff --git a/wbce/modules/topics/img/shadow/title_right.png b/wbce/modules/topics/img/shadow/title_right.png deleted file mode 100644 index ef0dc2017..000000000 Binary files a/wbce/modules/topics/img/shadow/title_right.png and /dev/null differ diff --git a/wbce/modules/topics/info.php b/wbce/modules/topics/info.php index d6349b034..b265c86de 100644 --- a/wbce/modules/topics/info.php +++ b/wbce/modules/topics/info.php @@ -3,8 +3,11 @@ $module_directory = 'topics'; $module_name = 'Topics'; $module_function = 'page'; -$module_version = '0.9.3'; +$module_version = '0.9.4'; +$module_status = 'Stable'; $module_platform = '2.8.x'; $module_author = 'Started by Chio Maisriml, www.websitebaker.at'; -$module_license = 'Creative Commons Attribution 3.0'; +$module_license = 'GNU General Public License'; +$module_license_terms = ''; +$module_requirements = '-'; $module_description = 'Topics is similar to news, but designed for lots of articles or tutorials.'; \ No newline at end of file diff --git a/wbce/modules/topics/languages/DE.php b/wbce/modules/topics/languages/DE.php index 54afad8e2..e87ec2ccc 100644 --- a/wbce/modules/topics/languages/DE.php +++ b/wbce/modules/topics/languages/DE.php @@ -79,6 +79,8 @@ $MOD_TOPICS['DATE_USAGE_3'] = 'Auto-Archiv'; $MOD_TOPICS['TOPICSMASTER_SELECT'] = 'TopicsMaster Sections'; +$MOD_TOPICS['TOPIC_DATE'] = 'Topic Datum'; + $MOD_TOPICS['MOVE_TO'] = 'verschieben zu:'; $MOD_TOPICS['AUTO_ARCHIVE'] = 'Auto-Archivierung:'; $MOD_TOPICS['AUTO_ARCHIVE_0'] = 'Aus'; @@ -159,7 +161,7 @@ $MOD_TOPICS['AUTHORSHEADLINE'] = 'Weitere Autoren, die dieses Thema bearbeiten dürfen'; $MOD_TOPICS['SETAUTHORSHEADLINE'] = 'Anderen Autor zum Inhaber machen:'; -$MOD_TOPICS['SAVEFORALL'] = 'Einstellungen auch für alle anderen Abschnitte übernehmen (VORSICHT!)'; +$MOD_TOPICS['SAVEFORALL'] = 'Einstellungen auch für alle anderen Abschnitte mit dem gleichen Bildverzeichnis übernehmen (VORSICHT!)'; $MOD_TOPICS['SAVE_FINISH'] = 'Sichern und fertig'; //Commentframe diff --git a/wbce/modules/topics/languages/EN.php b/wbce/modules/topics/languages/EN.php index 7105c0931..e3a476245 100644 --- a/wbce/modules/topics/languages/EN.php +++ b/wbce/modules/topics/languages/EN.php @@ -74,6 +74,9 @@ $MOD_TOPICS['DATE_USAGE_1'] = 'I want to edit the date'; $MOD_TOPICS['DATE_USAGE_2'] = 'Timebased publishing'; $MOD_TOPICS['DATE_USAGE_3'] = 'Auto-Archive'; +$MOD_TOPICS['TOPICSMASTER_SELECT'] = 'TopicsMaster Sections'; + +$MOD_TOPICS['TOPIC_DATE'] = 'topic date'; $MOD_TOPICS['MOVE_TO'] = 'move to:'; $MOD_TOPICS['AUTO_ARCHIVE'] = 'Auto-Archive'; @@ -155,7 +158,7 @@ $MOD_TOPICS['AUTHORSHEADLINE'] = 'Other authors, that may modify this topic'; $MOD_TOPICS['SETAUTHORSHEADLINE'] = 'Make author to owner:'; -$MOD_TOPICS['SAVEFORALL'] = 'Save this settings for ALL sections (be carefull!)'; +$MOD_TOPICS['SAVEFORALL'] = 'Save this settings for ALL sections with the same picture directory (be carefull!)'; $MOD_TOPICS['SAVE_FINISH'] = 'Save and Finish'; //Commentframe diff --git a/wbce/modules/topics/modify.php b/wbce/modules/topics/modify.php index f20cbec66..64c9dd619 100644 --- a/wbce/modules/topics/modify.php +++ b/wbce/modules/topics/modify.php @@ -82,7 +82,7 @@ //echo 'reverse'; $t = time(); -$t2 = $t - (60 * 60 * 24 * 30); //1 Monat zurück +$t2 = $t - (60 * 60 * 24 * 30); //1 Monat zurueck // Loop through existing topics $query_topics = "SELECT * FROM `".TABLE_PREFIX."mod_".$tablename."` WHERE section_id = '$section_id' ORDER BY $sort_topics_by"; diff --git a/wbce/modules/topics/topicslist-bakery.php b/wbce/modules/topics/modify_seealso-bakery.php similarity index 98% rename from wbce/modules/topics/topicslist-bakery.php rename to wbce/modules/topics/modify_seealso-bakery.php index bb98c025a..fa0a9be90 100644 --- a/wbce/modules/topics/topicslist-bakery.php +++ b/wbce/modules/topics/modify_seealso-bakery.php @@ -40,9 +40,9 @@ // Include WB functions file -require_once(WB_PATH.'/framework/functions.php'); +require(WB_PATH.'/framework/functions.php'); // Include the ordering class -require_once(WB_PATH.'/framework/class.order.php'); +require(WB_PATH.'/framework/class.order.php'); @@ -160,4 +160,4 @@ //Print admin footer $admin->print_footer(); -?> +?> \ No newline at end of file diff --git a/wbce/modules/topics/topicslist.php b/wbce/modules/topics/modify_seealso.php similarity index 84% rename from wbce/modules/topics/topicslist.php rename to wbce/modules/topics/modify_seealso.php index ef46722cc..56fad4219 100644 --- a/wbce/modules/topics/topicslist.php +++ b/wbce/modules/topics/modify_seealso.php @@ -27,7 +27,7 @@ exit("So what happend with the topic?"); } $thistopic = $query_topics->fetchRow(); -//Überprüfung: +//Überpruefung: if ($authoronly) { $authors = $thistopic['authors']; $pos = strpos ($authors,','.$user_id.','); @@ -59,7 +59,7 @@ } */ $sort_topics_by = get_sort_topics_by($sort_topics); -echo $sort_topics_by; +//echo $sort_topics_by; //Find Links IN $topic_idstr = '%,'.$topic_id.',%'; $tquery = "SELECT topic_id, see_also FROM `".TABLE_PREFIX."mod_".$tablename."` WHERE see_also LIKE '".$topic_idstr."'"; @@ -76,6 +76,8 @@ $see_also_text = substr($thistopic['see_also'], 1, -1); if ($see_also_text == '') {$see_also_arr = array();} else $see_also_arr = explode(',',$see_also_text); + + echo '

'. $thistopic['title'].'

'; if ($thistopic['short_description'] != '') {echo '
'. $thistopic['short_description'].'
';} echo '
'. $thistopic['content_short'].'
'; @@ -83,14 +85,16 @@ echo 'Links out: ' . count($see_also_arr) . '
Links in: ' . count($linkin_array); echo '

'; +echo ''; + $t = time(); -$t2 = $t - (60 * 60 * 24 * 30); //1 Monat zurück +$t2 = $t - (60 * 60 * 24 * 30); //1 Monat zurueck $query_extra = ''; if ($sort_topics == 3) {$query_extra = ' AND published_when >= '.$t2.' ';} - -if ($restrict2picdir > 1) { +//echo $restrict2picdir; +if ($restrict2picdir > 0) { $picture_dir = $settings_fetch['picture_dir']; $theq = "SELECT section_id FROM ".TABLE_PREFIX."mod_".$tablename."_settings WHERE section_id > '0' AND picture_dir = '".$picture_dir."'"; $query = $database->query($theq); @@ -107,7 +111,7 @@ $limit_sql = ' LIMIT 100'; -$theq = "SELECT published_when, section_id, page_id, topic_id, link, title, short_description, hascontent, active, authors FROM ".TABLE_PREFIX."mod_".$tablename." where hascontent > '0' ".$query_extra." ORDER BY ".$sort_topics_by.$limit_sql; +$theq = "SELECT * FROM ".TABLE_PREFIX."mod_".$tablename." where hascontent > '0' ".$query_extra." ORDER BY ".$sort_topics_by.$limit_sql; $query_topics = $database->query($theq); // Loop through existing topics @@ -123,7 +127,7 @@ - +
0) { if ($modifylinkto != '') {echo $modifylinkto;} else {echo '';} - echo ''.stripslashes($topic['title']).''; if ($counter < 20 AND $topic['short_description'] !='') {echo '
'.$topic['short_description'].'
';} + echo ''.stripslashes($topic['title']).''; + if ($counter < 50 AND $topic['short_description'] !='') { + echo '
'.$topic['short_description'].'
'; + $short = strip_tags($topic['content_short']); + echo '
'.$short. ' '.$topic['description'].' '.$topic['keywords'].'
'; + } } else { echo 'Switchto - '.stripslashes($topic['title']); } @@ -198,11 +207,49 @@
  
+ + + Get from'; } if ($use_getfrom && $use_presets) echo " | "; if ($use_presets) { echo 'Presets'; } -if ($use_getfrom || $use_presets) echo "
"; + + +echo ' | New: Assistant (partial presets)'; $query_others = $database->query("SELECT page_id, section_id FROM ".TABLE_PREFIX."mod_".$tablename."_settings WHERE section_id <> '$section_id' AND section_id > '0' ORDER BY page_id ASC"); $othersectionspresent = $query_others->numRows(); @@ -67,16 +69,15 @@ if ($use_presets) { //get presets - $thelanguage = strtolower(LANGUAGE); - if (!is_dir(WB_PATH.'/modules/'.$mod_dir.'/presets-'.$thelanguage)) { $thelanguage = 'en';} - $presets_files = WB_PATH.'/modules/'.$mod_dir.'/presets-'.$thelanguage; + $thelanguage = strtolower(LANGUAGE); + $presets_files = WB_PATH.'/modules/'.$mod_dir.'/presets-en'; echo ''; echo ''; } - +echo ''; echo '
'; @@ -718,9 +725,9 @@ '; - echo $TEXT['LONG'].': '; - echo $MOD_TOPICS['EXTRA'].': '; + echo $TEXT['SHORT'].': '; + echo $TEXT['LONG'].': '; + echo $MOD_TOPICS['EXTRA'].': '; echo '

'.$MOD_TOPICS['EDITOR_HEIGHTS_HINT'].'


'; diff --git a/wbce/modules/topics/modify_topic.php b/wbce/modules/topics/modify_topic.php index 7c811643c..14d46c2b2 100644 --- a/wbce/modules/topics/modify_topic.php +++ b/wbce/modules/topics/modify_topic.php @@ -194,7 +194,10 @@ function show_wysiwyg_editor($name,$id,$content,$width,$height) {
-
: +
:
>
Meta-Description:
-
+
Meta-Keywords:
-
+ @@ -598,9 +601,9 @@ function show_wysiwyg_editor($name,$id,$content,$width,$height) { echo '
'; if ($fetch_content['content_long'] != '' AND $author_trust_rating < 3) { if ($topic_seealso_support == 'bakery') { - echo ''.$MOD_TOPICS['SEE_ALSO_CHANGE']."\n"; + echo ''.$MOD_TOPICS['SEE_ALSO_CHANGE']."\n"; } else { - echo ''.$MOD_TOPICS['SEE_ALSO_CHANGE']."\n"; + echo ''.$MOD_TOPICS['SEE_ALSO_CHANGE']."\n"; } if ($authorsgroup > 0 AND ($author_invited OR $authoronly == false OR $user_id == $fetch_content['posted_by']) ) { echo ''.$MOD_TOPICS['EDITAUTHORS']."\n"; diff --git a/wbce/modules/topics/permissioncheck.php b/wbce/modules/topics/permissioncheck.php index 75c66d48d..31ca5d65a 100644 --- a/wbce/modules/topics/permissioncheck.php +++ b/wbce/modules/topics/permissioncheck.php @@ -10,7 +10,7 @@ // include module_settings $topic_seealso_support = ''; require_once(WB_PATH.'/modules/'.$mod_dir.'/defaults/module_settings.default.php'); -require_once(WB_PATH.'/modules/'.$mod_dir.'/module_settings.php'); +include(WB_PATH.'/modules/'.$mod_dir.'/module_settings.php'); $isget = 0; @@ -73,7 +73,7 @@ //Aus module_settings.php: //$authorsgroup: Die Gruppe, der Autoren angehören. -//$noadmin_nooptions: Default: 1: Nur der Admin (Gruppe 1) kann Settings ändern +//$noadmin_nooptions: Default: 1: Nur der Admin (Gruppe 1) kann Settings aendern $user_id = $admin->get_user_id(); $user_in_groups = $admin->get_groups_id(); @@ -85,7 +85,7 @@ if (in_array($authorsgroup, $user_in_groups)) { $authoronly = true; $showoptions = false; echo "AUTOR"; } else { - $author_trust_rating = 0; //Best Trust; Flag aus module_settings.php wird zurückgesetzt + $author_trust_rating = 0; //Best Trust; Flag aus module_settings.php wird zurueckgesetzt } } @@ -95,7 +95,7 @@ $authoronly = false; //An admin cannot be autor only } -//Hier könnte man abwürgen, dass ein Autor ins Backend kommt. +//Hier könnte man abwuergen, dass ein Autor ins Backend kommt. if ($authoronly == true) {$fredit = 1;} //Provisorisch if ($fredit == 1) { diff --git a/wbce/modules/topics/picupload/additional_pics.php b/wbce/modules/topics/picupload/additional_pics.php index 9173de96b..f3dc52b30 100644 --- a/wbce/modules/topics/picupload/additional_pics.php +++ b/wbce/modules/topics/picupload/additional_pics.php @@ -41,7 +41,7 @@ if ( isset($_FILES['uploadpic']['tmp_name']) AND $_FILES['uploadpic']['tmp_name'] != '') { include('uploader.inc.php'); echo $messages; - $picture_dir = ''.$settings_fetch['picture_dir']; //hat der Uploader geändert + $picture_dir = ''.$settings_fetch['picture_dir']; //hat der Uploader geaendert //die(); } } @@ -87,22 +87,26 @@ $additional_picture_path = WB_PATH.''.$picture_dir.'/topic'.$topic_id; $pics = array(); if (is_dir($additional_picture_path)) { + //$files = glob($additional_picture_path."/*.{jpg,png,gif}", GLOB_BRACE); + + //Siehe: https://forum.wbce.org/viewtopic.php?pid=8082#p8082 + $dir = $additional_picture_path . '/'; + $extensions = array('jpg', 'jpeg', 'png', 'gif', 'bmp'); + + $result = array(); + $directory = new DirectoryIterator($dir); + foreach ($directory as $fileinfo) { + if ($fileinfo->isFile()) { + $extension = strtolower(pathinfo($fileinfo->getFilename(), PATHINFO_EXTENSION)); + if (in_array($extension, $extensions)) { + $result[] = $dir.$fileinfo->getFilename(); + } + } + } + $files = $result; + //------------------------------------------------------------ + - $dir = $additional_picture_path . '/'; - $extensions = array('jpg', 'jpeg', 'png', 'gif', 'bmp'); - - $result = array(); - $directory = new DirectoryIterator($dir); - foreach ($directory as $fileinfo) { - if ($fileinfo->isFile()) { - $extension = strtolower(pathinfo($fileinfo->getFilename(), PATHINFO_EXTENSION)); - if (in_array($extension, $extensions)) { - $result[] = $dir.$fileinfo->getFilename(); - } - } - } - $files = $result; - if(count($files) > 0 ) { echo '
Thumb (edit) | '; echo 'Thumb | '; diff --git a/wbce/modules/topics/picupload/imagefunctions.php b/wbce/modules/topics/picupload/imagefunctions.php index 1a3106986..d54901982 100644 --- a/wbce/modules/topics/picupload/imagefunctions.php +++ b/wbce/modules/topics/picupload/imagefunctions.php @@ -109,13 +109,13 @@ function resizepic($filepath, $newfilepath, $pic_soll_w, $pic_soll_h, $checksize if ($pic_ist_w <= $pic_soll_w_calc AND $pic_ist_h <= $pic_soll_h_calc) { if ($bg == '') { - //1: Wenn keine Füllfarbe angegeben: das bild as is kopieren + //1: Wenn keine Fuellfarbe angegeben: das bild as is kopieren //echo '1 width/height: '.$pic_ist_w.'/'.$pic_ist_h.'
'; //die(); copy($filepath, $newfilepath); return 0; } else { - //2: weitermachen und Auffüllen + //2: weitermachen und Auffuellen echo '2 width/height: '.$pic_ist_w.'/'.$pic_ist_h.'
'; die(); $ofx = 0; $ofy = 0; $pic_soll_w_calc = $pic_ist_w; $pic_soll_h_calc = $pic_ist_h; @@ -126,7 +126,7 @@ function resizepic($filepath, $newfilepath, $pic_soll_w, $pic_soll_h, $checksize //============================================================ //16.04.2013: - //Bilder sollten nicht verändert werden, wenn sie zu klein sind UND Keine Soll-Höhe/Breite angegeben wurde: + //Bilder sollten nicht veraendert werden, wenn sie zu klein sind UND Keine Soll-Höhe/Breite angegeben wurde: if ($pic_soll_h < 1 AND $pic_soll_h_calc < $pic_soll_h_calc) {$pic_soll_h_calc= $pic_soll_h_calc; $ofy = 0;} if ($pic_soll_w < 1 AND $pic_soll_w_calc < $pic_soll_w_calc) {$pic_soll_w_calc= $pic_soll_w_calc; $ofx = 0;} @@ -158,8 +158,8 @@ function resizepic($filepath, $newfilepath, $pic_soll_w, $pic_soll_h, $checksize - //Änderungen der Variablen die für JCrop newfileerstellung anders sein müssen - //smallheight wird über ratio vom ausschnitt übernommen: + //Änderungen der Variablen die fuer JCrop newfileerstellung anders sein muessen + //smallheight wird ueber ratio vom ausschnitt uebernommen: if (!empty ($positionW) && !empty($positionH)) { $pic_soll_w_calc = $pic_soll_w; $pic_soll_h_calc = $pic_soll_h; diff --git a/wbce/modules/topics/picupload/modify_thumb.js b/wbce/modules/topics/picupload/modify_thumb.js index 30d1acec8..7c7e94a5d 100644 --- a/wbce/modules/topics/picupload/modify_thumb.js +++ b/wbce/modules/topics/picupload/modify_thumb.js @@ -1,5 +1,5 @@ $(document).ready(function() { - $.insert('../../include/jquery/jquery-ui-min.js'); + $.insert(WB_URL+'/include/jquery/jquery-ui-min.js'); $.insert(MOD_URL+'/picupload/jcrob/js/jquery.Jcrop.min.js'); }); @@ -8,17 +8,16 @@ $(document).ready(function() { // Remember to invoke within jQuery(window).load(...) // If you don't, Jcrop may not initialize properly $(window).load(function(){ + if (typeof settingsRatio == "undefined") { return; } $('#cropbox').Jcrop({ onChange: showPreview, onSelect: updateCoords, aspectRatio: settingsRatio }); - }); -function showPreview(coords) -{ +function showPreview(coords) { var imgWidth = $("#cropbox").width(); var scale = relWidth / imgWidth; @@ -41,8 +40,7 @@ function showPreview(coords) }; -function updateCoords(c) -{ +function updateCoords(c) { var imgWidth = $("#cropbox").width(); var scale = relWidth / imgWidth; diff --git a/wbce/modules/topics/picupload/modify_thumb.php b/wbce/modules/topics/picupload/modify_thumb.php index 944a20274..2100f3951 100644 --- a/wbce/modules/topics/picupload/modify_thumb.php +++ b/wbce/modules/topics/picupload/modify_thumb.php @@ -26,9 +26,9 @@ if(isset($_POST['what']) AND $_POST['what'] == 'view') {$whatdir = 'view';} if(!isset($_GET['fn'])) {die('no filename');} -$file_name = $_GET['fn']; //zb file.jpg - gemeint ist immer zoom, außer es existiert nicht. +$file_name = $_GET['fn']; //zb file.jpg - gemeint ist immer zoom, auszer es existiert nicht. -//Vortest für getbasics.inc.php +//Vortest fuer getbasics.inc.php $subdir = ''; $morepicstest = explode('/', $file_name); if (count($morepicstest) == 2) { @@ -134,12 +134,12 @@ //echo "

w_thumb: $w_thumb, h_thumb: $h_thumb, w: ".$post_w.' h: '. $post_h.'

'; //die(); if (resizepic($full_file, $thumb_file, $w_thumb, $h_thumb, 0, $_POST['x'], $_POST['y'], $post_w, $post_h)) { - $admin->print_success('Thumb erfolgreich geändert', WB_URL.'/modules/'.$mod_dir.'/picupload/uploadview.php?'.$p.'&fn='.$subdir.$file_name); + $admin->print_success('Thumb erfolgreich geaendert', WB_URL.'/modules/'.$mod_dir.'/picupload/uploadview.php?'.$p.'&fn='.$subdir.$file_name); } } else { //============================================================== - //Vorgabewerte für jCrop + //Vorgabewerte fuer jCrop //============================================================== if ($previewWidth == 0 OR $previewHeight == 0) { $ratio = ''; //keine Ratio-Vorgabe beim Beschneiden @@ -218,7 +218,7 @@ //Neues Thumb erstellen if (generateThumb($full_file, $thumb_file, $settings['thumb_size'], 1, $settings['ratio'], $_POST['x'], $_POST['y'], $_POST['w'], $_POST['h'])) { - $admin->print_success('Thumb erfolgreich geändert', WB_URL.'/modules/foldergallery/modify_cat.php?page_id='.$page_id.'§ion_id='.$section_id.'&cat_id='.$cat_id); + $admin->print_success('Thumb erfolgreich geaendert', WB_URL.'/modules/foldergallery/modify_cat.php?page_id='.$page_id.'§ion_id='.$section_id.'&cat_id='.$cat_id); } } else { diff --git a/wbce/modules/topics/picupload/uploader.inc.php b/wbce/modules/topics/picupload/uploader.inc.php index 9b97350a7..e3d74823d 100644 --- a/wbce/modules/topics/picupload/uploader.inc.php +++ b/wbce/modules/topics/picupload/uploader.inc.php @@ -118,7 +118,7 @@ function checkforsame($w_soll, $h_soll, $width, $height) { if ($bildtype == "" OR $width == 0) { echo '

no picture file uploaded (jpg, gif, png)

'; continue; - //nur überspringen! + //nur ueberspringen! } $fname = $_FILES['uploadpic']['name'][$i]; @@ -126,7 +126,7 @@ function checkforsame($w_soll, $h_soll, $width, $height) { $fname = substr($fname, 0, strlen($fname) - 4); $fname = page_filename($fname); - //ggf eine Zahl anhängen: + //ggf eine Zahl anhaengen: if(isset($_REQUEST['nooverwrite']) ) { $ncount = 1; while ($ncount < 100) { diff --git a/wbce/modules/topics/picupload/uploadview.php b/wbce/modules/topics/picupload/uploadview.php index 989018c4e..c74cfbcd7 100644 --- a/wbce/modules/topics/picupload/uploadview.php +++ b/wbce/modules/topics/picupload/uploadview.php @@ -40,7 +40,7 @@ $imagename = str_replace('zoom/','',$imagename ); $imagename = str_replace('thumbs/','',$imagename ); -//Vortest für getbasics.inc.php +//Vortest fuer getbasics.inc.php $subdir = ''; $morepicstest = explode('/', $imagename); if (count($morepicstest) == 2) { diff --git a/wbce/modules/topics/presets-en/floating-blocks-overview.js b/wbce/modules/topics/presets-en/floating-blocks-overview.js deleted file mode 100644 index 5500cba92..000000000 --- a/wbce/modules/topics/presets-en/floating-blocks-overview.js +++ /dev/null @@ -1,15 +0,0 @@ -//Starting Javascript - -document.modify.header.value = '\n

[SECTION_TITLE]

\n
\n
\n'; -document.modify.topics_loop.value = '\n
\n[SHORT_DESCRIPTION]  \n\n\n
\n

{TITLE}

[TOPIC_SHORT]\n
\n[READ_MORE][EDITLINK]
\n'; -document.modify.footer.value = '
\n{PREV_NEXT_PAGES}\n
\n
\n'; - -// To save as a preset, change this line with your description: -document.getElementById('presetsdescription').innerHTML = 'Check loop fields'; -showtabarea(3); - -document.modify.header.style.backgroundColor = '#e8ff98'; -document.modify.topics_loop.style.backgroundColor = '#e8ff98'; -document.modify.footer.style.backgroundColor = '#e8ff98'; - -alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/presets-en/default-09.js b/wbce/modules/topics/presets-en/old_topics-0.9.0-default.js similarity index 74% rename from wbce/modules/topics/presets-en/default-09.js rename to wbce/modules/topics/presets-en/old_topics-0.9.0-default.js index bb32f8bbf..0482bfb5b 100644 --- a/wbce/modules/topics/presets-en/default-09.js +++ b/wbce/modules/topics/presets-en/old_topics-0.9.0-default.js @@ -13,13 +13,13 @@ document.modify.header.value = '\n'; document.modify.topics_loop.value = '
\n{THUMB}\n

{TITLE}

\n[TOPIC_SHORT] \n[READ_MORE][EDITLINK]
\n'; document.modify.footer.value = '{PREV_NEXT_PAGES}\n'; document.modify.topic_header.value = '
\n

[TITLE]

\n

[USER_DISPLAY_NAME] on [PUBL_DATE]

\n[USER_MODIFIEDINFO]\n
{PICTURE}
[TOPIC_SHORT]
\n
\n'; -document.modify.topic_footer.value = '{SEE_ALSO}\n{SEE_PREVNEXT}\n

Zurück

\n[EDITLINK]\n
\n
\n'; +document.modify.topic_footer.value = '{SEE_ALSO}\n{SEE_PREVNEXT}\n

Zurück

\n[EDITLINK]\n
\n
\n'; document.modify.topic_block2.value = '\n
\n{PICTURE}\n[TOPIC_SHORT]\n{SEE_ALSO}\n{SEE_PREVNEXT}\n
\n'; document.modify.see_also_link_title.value = '

Siehe auch:

'; document.modify.next_link_title.value = '

Neuere Themen:

'; document.modify.previous_link_title.value = '

Ältere Themen:

'; -document.modify.pnsa_string.value = '

\n[TITLE]\n[TITLE]
\n[SHORT_DESCRIPTION]

'; -document.modify.sa_string.value = '

\n[TITLE]\n[TITLE]
\n[SHORT_DESCRIPTION]

'; +document.modify.pnsa_string.value = ''; +document.modify.sa_string.value = ''; selectRadioButtons (document.modify.sort_comments, 0); selectRadioButtons (document.modify.use_captcha, 1); selectDropdownOption (document.modify.commenting, 2); diff --git a/wbce/modules/topics/presets-en/pics_default_0.9.4.js b/wbce/modules/topics/presets-en/pics_default_0.9.4.js new file mode 100644 index 000000000..01f74ac3c --- /dev/null +++ b/wbce/modules/topics/presets-en/pics_default_0.9.4.js @@ -0,0 +1,54 @@ +//Starting Javascript + +document.modify.picture_dir.value = '/media/topics-pictures'; +document.modify.w_zoom.value = 'prop.'; +document.modify.h_zoom.value = '1200'; +document.modify.w_view.value = '440'; +document.modify.h_view.value = '280'; +document.modify.w_thumb.value = '100'; +document.modify.h_thumb.value = '100'; +document.modify.zoomclass.value = ''; +document.modify.zoomrel.value = ''; +document.modify.w_zoom2.value = 'prop.'; +document.modify.h_zoom2.value = '1200'; +document.modify.w_view2.value = '440'; +document.modify.h_view2.value = 'prop.'; +document.modify.w_thumb2.value = 'prop.'; +document.modify.h_thumb2.value = '120'; +document.modify.zoomclass2.value = 'colorbox'; +document.modify.zoomrel2.value = 'fancybox'; +document.modify.additionalpics_string.value = '{THUMB}'; + + + +// To save as a preset, change this line with your description: +document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; + +document.modify.picture_dir.style.backgroundColor = '#e8ff98'; +document.modify.w_zoom.style.backgroundColor = '#e8ff98'; +document.modify.h_zoom.style.backgroundColor = '#e8ff98'; +document.modify.w_view.style.backgroundColor = '#e8ff98'; +document.modify.h_view.style.backgroundColor = '#e8ff98'; +document.modify.w_thumb.style.backgroundColor = '#e8ff98'; +document.modify.h_thumb.style.backgroundColor = '#e8ff98'; + +document.modify.w_zoom2.style.backgroundColor = '#e8ff98'; +document.modify.h_zoom2.style.backgroundColor = '#e8ff98'; +document.modify.w_view2.style.backgroundColor = '#e8ff98'; +document.modify.h_view2.style.backgroundColor = '#e8ff98'; +document.modify.w_thumb2.style.backgroundColor = '#e8ff98'; +document.modify.h_thumb2.style.backgroundColor = '#e8ff98'; + +document.modify.zoomclass.style.backgroundColor = '#e8ff98'; +document.modify.zoomrel.style.backgroundColor = '#e8ff98'; +document.modify.zoomclass2.style.backgroundColor = '#e8ff98'; +document.modify.zoomrel2.style.backgroundColor = '#e8ff98'; + +document.modify.additionalpics_string.style.backgroundColor = '#e8ff98'; + +document.getElementById('linktabarea2').style.backgroundColor = '#e8ff98'; + +showtabarea(2); + + +alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/presets-en/prev-next-default.js b/wbce/modules/topics/presets-en/prev-next-default.js deleted file mode 100644 index 431d480c4..000000000 --- a/wbce/modules/topics/presets-en/prev-next-default.js +++ /dev/null @@ -1,15 +0,0 @@ -//Starting Javascript - -document.modify.see_also_link_title.value = '

See also:

'; -document.modify.next_link_title.value = '

Recent Topics:

'; -document.modify.previous_link_title.value = '

Older Topics:

'; -document.modify.pnsa_string.value = '[THUMB]\n[TITLE]
\n[SHORT_DESCRIPTION]\nspan class="pnsaclear">\n
'; -document.modify.sa_string.value = '[THUMB]\n[TITLE]
\n[SHORT_DESCRIPTION]\nspan class="pnsaclear">\n
'; - -document.modify.additionalpics_string.value = '{THUMB}'; - - -// To save as a preset, change this line with your description: -document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; - -alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/presets-en/default-091.js b/wbce/modules/topics/presets-en/topics_0.9.4_default.js similarity index 84% rename from wbce/modules/topics/presets-en/default-091.js rename to wbce/modules/topics/presets-en/topics_0.9.4_default.js index 40b8507a1..6ee088607 100644 --- a/wbce/modules/topics/presets-en/default-091.js +++ b/wbce/modules/topics/presets-en/topics_0.9.4_default.js @@ -2,7 +2,7 @@ selectDropdownOption (document.modify.use_timebased_publishing, 1); selectDropdownOption (document.modify.sort_topics, 1); document.modify.topics_per_page.value = '0'; -document.modify.picture_dir.value = '/media/topics0911_dev-pictures'; +document.modify.picture_dir.value = '/media/topics-pictures'; document.modify.w_zoom.value = '0'; document.modify.h_zoom.value = '1200'; document.modify.w_view.value = '440'; @@ -25,12 +25,12 @@ document.modify.footer.value = '{PREV_NEXT_PAGES}\n'; selectDropdownOption (document.modify.pnsa_max, 4); document.modify.topic_header.value = '
\n

[TITLE]

\n

[USER_DISPLAY_NAME] ([USER_NAME]) on [PUBL_DATE]

\n[USER_MODIFIEDINFO]\n
{PICTURE}[TOPIC_SHORT]
\n
\n[ADDITIONAL_PICTURES]\n'; document.modify.topic_footer.value = '
\n{SEE_ALSO}{SEE_PREVNEXT}\n
\n

Back

\n[EDITLINK]\n
\n'; -document.modify.topic_block2.value = '\n\n'; +document.modify.topic_block2.value = '\n
\n{PICTURE}\n[TOPIC_SHORT]\n{SEE_ALSO}{SEE_PREVNEXT}\n
\n'; document.modify.see_also_link_title.value = '

Siehe auch:

'; document.modify.next_link_title.value = '

Neuere Themen:

'; document.modify.previous_link_title.value = '

Ältere Themen:

'; -document.modify.pnsa_string.value = '[THUMB]\n[TITLE]
\n[SHORT_DESCRIPTION]\n\n
\n'; -document.modify.sa_string.value = '[THUMB]\n[TITLE]
\n[SHORT_DESCRIPTION]\n\n
\n'; +document.modify.pnsa_string.value = '[THUMB]\n[TITLE]
\n[SHORT_DESCRIPTION]\n\n
\n'; +document.modify.sa_string.value = '[THUMB]\n[TITLE]
\n[SHORT_DESCRIPTION]\n\n
\n'; selectDropdownOption (document.modify.commenting, 2); selectDropdownOption (document.modify.default_link, 3); selectDropdownOption (document.modify.emailsettings, 2); diff --git a/wbce/modules/topics/presets-en/wb_at.js b/wbce/modules/topics/presets-en/wb_at.js deleted file mode 100644 index eaf826aeb..000000000 --- a/wbce/modules/topics/presets-en/wb_at.js +++ /dev/null @@ -1,28 +0,0 @@ -//Starting Javascript -selectDropdownOption (document.modify.sort_topics, 1); - -document.modify.picture_dir.value = '/media/topics-pictures'; -document.modify.header.value = '[SECTION_DESCRIPTION]'; -document.modify.topics_loop.value = '
\n

{TITLE}

\n{THUMB}\n
[TOPIC_SHORT] \n[READ_MORE]
\n\n'; -document.modify.footer.value = '
'; -document.modify.topic_header.value = '

[TITLE]

'; -document.modify.topic_footer.value = '{SEE_ALSO}\n{SEE_PREVNEXT}\n

Back

\n[EDITLINK]\n
'; -document.modify.topic_block2.value = '\n{PICTURE}[TOPIC_SHORT]'; -document.modify.see_also_link_title.value = '

See also:

'; -document.modify.next_link_title.value = '

Recent topics:

'; -document.modify.previous_link_title.value = '

Older Topics:

'; -document.modify.pnsa_string.value = '

[TITLE]\n[SHORT_DESCRIPTION]

'; -document.modify.sa_string.value = '

[TITLE]\n[SHORT_DESCRIPTION]

'; -selectRadioButtons (document.modify.sort_comments, 0); -selectRadioButtons (document.modify.use_captcha, 1); -selectDropdownOption (document.modify.commenting, 2); -selectDropdownOption (document.modify.default_link, 3); -document.modify.comments_header.value = '

Comments

'; -document.modify.comments_loop.value = '
\n

[DATE]

\n

{NAME}

\n

[COMMENT]

\n
'; -document.modify.comments_footer.value = ''; - - -// To save as a preset, change this line with your description: -document.getElementById('presetsdescription').innerHTML = 'Check changed fields'; - -alert("Done"); \ No newline at end of file diff --git a/wbce/modules/topics/save_seealso.php b/wbce/modules/topics/save_seealso.php index 2a79982ab..9e71d91fc 100644 --- a/wbce/modules/topics/save_seealso.php +++ b/wbce/modules/topics/save_seealso.php @@ -32,8 +32,8 @@ $database->query("UPDATE ".TABLE_PREFIX."mod_".$tablename." SET see_also = '$topiclinks_text' WHERE topic_id = '$topic_id'"); // Check if there is a db error, otherwise say successful -$gobackto = WB_URL.'/modules/'.$mod_dir.'/topicslist.php'; -if ($topic_seealso_support == 'bakery') {$gobackto = WB_URL.'/modules/'.$mod_dir.'/topicslist-bakery.php';} +$gobackto = WB_URL.'/modules/'.$mod_dir.'/modify_seealso.php'; +if ($topic_seealso_support == 'bakery') {$gobackto = WB_URL.'/modules/'.$mod_dir.'/modify_seealso-bakery.php';} $gobackto .= '?page_id='.$page_id.'§ion_id='.$section_id.'&topic_id='.$id.'&fredit='.$fredit; if($database->is_error()) { diff --git a/wbce/modules/topics/uninstall.php b/wbce/modules/topics/uninstall.php index e304f069f..5866dc403 100644 --- a/wbce/modules/topics/uninstall.php +++ b/wbce/modules/topics/uninstall.php @@ -43,5 +43,5 @@ $database->query("RENAME TABLE `".TABLE_PREFIX."mod_".$tablename."_comments` TO `".TABLE_PREFIX."mod_".$tablename."_comments_obsolete`"); $database->query("RENAME TABLE `".TABLE_PREFIX."mod_".$tablename."_settings` TO `".TABLE_PREFIX."mod_".$tablename."_settings_obsolete`"); -require_once(WB_PATH.'/framework/functions.php'); -rm_full_dir(WB_PATH.$topics_directory); \ No newline at end of file +//require_once(WB_PATH.'/framework/functions.php'); +//rm_full_dir(WB_PATH.$topics_directory); \ No newline at end of file diff --git a/wbce/modules/topics/view.final.php b/wbce/modules/topics/view.final.php index 34ceacb57..ce904652a 100644 --- a/wbce/modules/topics/view.final.php +++ b/wbce/modules/topics/view.final.php @@ -22,7 +22,7 @@ $the_stopdatetime = gmdate("H:i",$thetp); } - //Wer hier spezielle Würste gebraten haben will, muss sie sich selber machen ;-) + //Wer hier spezielle Wuerste gebraten haben will, muss sie sich selber machen ;-) $event_placeholders = array( '[EVENT_START_DATE]' => $posted_publ_date, '[EVENT_STOP_DATE]' => $the_stopdatetf, @@ -62,7 +62,7 @@ '[PICTURE_DIR]' => $picture_dir, '[PICTURE]' => $picture, '{PICTURE}' => $picture_tag, - '{PICTURE}' => $picture_tag, + '{THUMB}' => $thumb_tag, '[ADDITIONAL_PICTURES]' => $additional_pictures, '{FULL_TOPICS_LIST}' => $topics_linkslist, diff --git a/wbce/modules/topics/view.list.php b/wbce/modules/topics/view.list.php index 302a04885..bd9458487 100644 --- a/wbce/modules/topics/view.list.php +++ b/wbce/modules/topics/view.list.php @@ -228,7 +228,7 @@ if (substr($picture, 0, 7) == 'http://') { //external file: $picture_tag = ''; - $thumb_tag = ''; + $thumb = ''; } else { if ($picture_dir != '') { $picture_tag = ''; @@ -238,9 +238,11 @@ if (file_exists($zoompic)) { $picture_tag = ''.$picture_tag.''; } } } - $thumb_tag = ''; + $thumb = ''; + } - if ($hascontent > 0) {$thumb_tag = ''.$thumb_tag.'';} + $thumb_tag = $thumb; + if ($hascontent > 0) {$thumb_tag = ''.$thumb.'';} } $topic_short = ''; @@ -310,8 +312,8 @@ //Placeholder [EDITLINK] - //Eigentlich müsste bei einem Topic-Master noch überprüft werden, ob der User Berechtigung für die angegebene page_id hat. - //Das bremst aber zu stark ein und wird ohnehin beim Aufruf überprüft. + //Eigentlich muesste bei einem Topic-Master noch ueberprueft werden, ob der User Berechtigung fuer die angegebene page_id hat. + //Das bremst aber zu stark ein und wird ohnehin beim Aufruf ueberprueft. $edit_link = ''; if ($authoronly) { $makelisteditlink = false; @@ -340,8 +342,8 @@ // Replace vars with values - $vars = array('[TOPIC_ID]', '[TITLE]', '{TITLE}', '[SHORT_DESCRIPTION]', '[TOPIC_SHORT]', '[LINK]', '[MODI_DATE]', '[MODI_TIME]', '[PUBL_DATE]', '[PUBL_TIME]', '[READ_MORE]', '[ACTIVE]', '[PICTURE_DIR]', '[PICTURE]', '{PICTURE}', '{THUMB}', '[COUNTER]', '[COUNTER2]','[EDITLINK]','[XTRA1]', '[XTRA2]', '[XTRA3]', '[COMMENTSCOUNT]', '[COMMENTSCLASS]', '[CLASSES]', '[HREF]'); - $values = array($t_id, $title, $titleplus, $topic['short_description'], $topic_short, $topic_link, $posted_modi_date, $posted_modi_time, $posted_publ_date, $posted_publ_time, $readmorelink, $active, $picture_dir, $picture, $picture_tag, $thumb_tag, $counter, ($counter % 2), $edit_link, $topic['txtr1'], $topic['txtr2'], $topic['txtr3'], $comments_count, $commentsclass, $classes, $href); + $vars = array('[TOPIC_ID]', '[TITLE]', '{TITLE}', '[SHORT_DESCRIPTION]', '[TOPIC_SHORT]', '[LINK]', '[MODI_DATE]', '[MODI_TIME]', '[PUBL_DATE]', '[PUBL_TIME]', '[READ_MORE]', '[ACTIVE]', '[PICTURE_DIR]', '[PICTURE]', '{PICTURE}', '[THUMB]', '{THUMB}', '[COUNTER]', '[COUNTER2]','[EDITLINK]','[XTRA1]', '[XTRA2]', '[XTRA3]', '[COMMENTSCOUNT]', '[COMMENTSCLASS]', '[CLASSES]', '[HREF]'); + $values = array($t_id, $title, $titleplus, $topic['short_description'], $topic_short, $topic_link, $posted_modi_date, $posted_modi_time, $posted_publ_date, $posted_publ_time, $readmorelink, $active, $picture_dir, $picture, $picture_tag, $thumb, $thumb_tag, $counter, ($counter % 2), $edit_link, $topic['txtr1'], $topic['txtr2'], $topic['txtr3'], $comments_count, $commentsclass, $classes, $href); $listrow = str_replace($vars, $values, $setting_topics_loop); if (isset($users)) { diff --git a/wbce/modules/topics/view.topic.php b/wbce/modules/topics/view.topic.php index 08640bbb1..2ff404312 100644 --- a/wbce/modules/topics/view.topic.php +++ b/wbce/modules/topics/view.topic.php @@ -77,7 +77,7 @@ $showmax_prev_next_links = (int) $settings_fetch['pnsa_max']; -//Neu: Enthält auch die Daten zu den additional pictures +//Neu: Enthaelt auch die Daten zu den additional pictures $setting_additionalpics_string = '{THUMB}'; if (is_array($setting_pnsa_array) AND count($setting_pnsa_array) > 5 ) { $setting_additionalpics_string = $setting_pnsa_array[5];