BBCode w newsach i artykułach
|
Vallhalen |
Dodany dnia 23.09.2010 21:22:00
|
Początkujący
Postów: 156 Pomógł: 2 Ostrzeżeń: 2
Data rejestracji: 05.11.2006 02:05
|
Co czynić gdy potrzebuję mieć mozliwość wstawiania bbcodów przy włączonym tinymce ? Pozdrawiam i z góry dziękuję za cierpliwe wyjaśnienie
Na odpowiedz nalezy czekać cierpliwie....
|
|
|
|
Wścibski Gość |
Dodany dnia 24.11.2024 18:20:52
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
eldiablo |
Dodany dnia 23.09.2010 22:32:21
|
Bywalec
Postów: 671 Pomógł: 80
Data rejestracji: 13.07.2009 19:20
|
Vallhalen napisał/a:
Co czynić gdy potrzebuję mieć mozliwość wstawiania bbcodów przy włączonym tinymce ? Pozdrawiam i z góry dziękuję za cierpliwe wyjaśnienie
Włączyć plugin bbcode w TinyMCE ?
Jednakże są to bb'ki od TinyMCE nie od fusiona. I to i to to raczej, chyba, prawdopodobnie nie da się. |
|
|
|
Vallhalen |
Dodany dnia 23.09.2010 22:51:32
|
Początkujący
Postów: 156 Pomógł: 2 Ostrzeżeń: 2
Data rejestracji: 05.11.2006 02:05
|
eldiablo napisał/a:
Vallhalen napisał/a:
Co czynić gdy potrzebuję mieć mozliwość wstawiania bbcodów przy włączonym tinymce ? Pozdrawiam i z góry dziękuję za cierpliwe wyjaśnienie
Włączyć plugin bbcode w TinyMCE ?
Jednakże są to bb'ki od TinyMCE nie od fusiona. I to i to to raczej, chyba, prawdopodobnie nie da się.
Włączyć plugin? Coś więcej poproszę. How?
Drugiego zdania nie rozumiem do końca niemniej wiem, że nie ma rzeczy niemożliwych
Pozdrawiam z szacunkiem.
Na odpowiedz nalezy czekać cierpliwie....
|
|
|
|
eldiablo |
Dodany dnia 23.09.2010 23:33:45
|
Bywalec
Postów: 671 Pomógł: 80
Data rejestracji: 13.07.2009 19:20
|
How ?
1) otwierasz plik admin_header_mce.php w katalogu templates
2) szukasz fragmentu:
plugins: 'safari,pagebreak,style,layer,table,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
3) dodajesz do niego bbcode
4) wygląda to wówczas tak:
plugins: 'bbcode,safari,pagebreak,style,layer,table,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
5) TinyMCE działa teraz jako bbcode edytor ;)
6) czyli zamiast
<strong>da</strong> otrzymujesz [b]sda[/b]
Co do drugiego zdania, to znaczy że nie tak mi się zdaje, współpracy bbcode'ów fusiona z TinyMCE. |
|
|
|
Vallhalen |
Dodany dnia 24.09.2010 10:44:42
|
Początkujący
Postów: 156 Pomógł: 2 Ostrzeżeń: 2
Data rejestracji: 05.11.2006 02:05
|
Dziękuję za pomoc (działa ) Niemniej wyraziłem się nieprecyzyjnie :/ Chciałbm otrzymac efekt w którym aktywowane wczesniej bb cody (ich ikonki) beda klikalne z poziomu tiny mce. zalaczam obrazek zeby pokazac o co dokladnie chodzi.
Uploaded with ImageShack.us
pozdrawiam z szacunkiem.
Edytowane przez Vallhalen dnia 24.09.2010 10:45:16
Na odpowiedz nalezy czekać cierpliwie....
|
|
|
|
piciu |
Dodany dnia 27.09.2010 22:31:59
|
Przedszkolak
Postów: 3 Pomógł: 1
Data rejestracji: 25.09.2010 22:11
|
Witam wszystkich, po opisie Pieki o BBCode w newsach i artykułach, coś nie wychodzi, w news mam bbcode i działają ok, ale jak zrobiłem to w pliku submit w pozycjach do artykułów, ikony bbcode są ale jak naduszę je to wyskakuje proszę uzupełnić wszystkie pola.
Jak naduszę podgląd to po prostu stronka się odświeża, jakieś propozycje?
Wersja 7.01.01
Załączam submit:
<?php
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."submit.php";
if (!iMEMBER) { redirect("index.php"); }
if (!isset($_GET['stype']) || !preg_check("/^[a-z]$/", $_GET['stype'])) { redirect("index.php"); }
$submit_info = array();
if ($_GET['stype'] == "l") {
if (isset($_POST['submit_link'])) {
if ($_POST['link_name'] != "" && $_POST['link_url'] != "" && $_POST['link_description'] != "") {
$submit_info['link_category'] = stripinput($_POST['link_category']);
$submit_info['link_name'] = stripinput($_POST['link_name']);
$submit_info['link_url'] = stripinput($_POST['link_url']);
$submit_info['link_description'] = stripinput($_POST['link_description']);
$result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('l', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')");
add_to_title($locale['global_200'].$locale['400']);
opentable($locale['400']);
echo "<div style='text-align:center'><br />\n".$locale['410']."<br /><br />\n";
echo "<a href='submit.php?stype=l'>".$locale['411']."</a><br /><br />\n";
echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
closetable();
}
} else {
$opts = "";
add_to_title($locale['global_200'].$locale['400']);
opentable($locale['400']);
$result = dbquery("SELECT weblink_cat_id, weblink_cat_name FROM ".DB_WEBLINK_CATS." WHERE ".groupaccess("weblink_cat_access")." ORDER BY weblink_cat_name");
if (dbrows($result)) {
while ($data = dbarray($result)) {
$opts .= "<option value='".$data['weblink_cat_id']."'>".$data['weblink_cat_name']."</option>\n";
}
echo $locale['420']."<br /><br />\n";
echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=l' onsubmit='return validateLink(this);'>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n";
echo "<tr>\n<td class='tbl'>".$locale['421']."</td>\n";
echo "<td class='tbl'><select name='link_category' class='textbox'>\n$opts</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['422']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_name' maxlength='100' class='textbox' style='width:300px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['423']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_url' value='http://' maxlength='200' class='textbox' style='width:300px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['424']."</td>\n";
echo "<td class='tbl'><input type='text' name='link_description' maxlength='200' class='textbox' style='width:300px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl'><br />\n";
echo "<input type='submit' name='submit_link' value='".$locale['425']."' class='button' />\n</td>\n";
echo "</tr>\n</table>\n</form>\n";
} else {
echo "<div style='text-align:center'><br />\n".$locale['551']."<br /><br />\n</div>\n";
}
closetable();
}
} elseif ($_GET['stype'] == "n") {
require_once INCLUDES."bbcode_include.php";
if (isset($_POST['submit_news'])) {
if ($_POST['news_subject'] != "" && $_POST['news_body'] != "") {
$submit_info['news_subject'] = stripinput($_POST['news_subject']);
$submit_info['news_cat'] = isnum($_POST['news_cat']) ? $_POST['news_cat'] : "0";
$submit_info['news_body'] = descript($_POST['news_body']);
$submit_info['news_breaks'] = (isset($_POST['line_breaks']) ? "y" : "n");
$result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES('n', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')");
add_to_title($locale['global_200'].$locale['450']);
opentable($locale['450']);
echo "<div style='text-align:center'><br />\n".$locale['460']."<br /><br />\n";
echo "<a href='submit.php?stype=n'>".$locale['461']."</a><br /><br />\n";
echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
closetable();
}
} else {
if (isset($_POST['preview_news'])) {
$news_subject = stripinput($_POST['news_subject']);
$news_cat = isnum($_POST['news_cat']) ? $_POST['news_cat'] : "0";
$news_body = phpentities(descript(stripslash($_POST['news_body'])));
$breaks = (isset($_POST['line_breaks']) ? " checked='checked'" : "");
opentable($news_subject);
echo (isset($_POST['line_breaks']) ? nl2br(parseubb($news_body)) : parseubb($news_body));
closetable();
tablebreak();
}
if (!isset($_POST['preview_news'])) {
$news_subject = "";
$news_cat = "0";
$news_body = "";
$breaks = " checked='checked'";
}
$cat_list = ""; $sel = "";
$result2 = dbquery("SELECT news_cat_id, news_cat_name FROM ".DB_NEWS_CATS." ORDER BY news_cat_name");
if (dbrows($result2)) {
while ($data2 = dbarray($result2)) {
if (isset($_POST['preview_news'])) { $sel = ($news_cat == $data2['news_cat_id'] ? " selected" : ""); }
$cat_list .= "<option value='".$data2['news_cat_id']."'".$sel.">".$data2['news_cat_name']."</option>\n";
}
}
add_to_title($locale['global_200'].$locale['450']);
opentable($locale['450']);
echo $locale['470']."<br /><br />\n";
echo "<form name='inputform' method='post' action='".FUSION_SELF."?stype=n' onsubmit='return validateNews(this);'>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
echo "<td class='tbl'>".$locale['471']."</td>\n";
echo "<td class='tbl'><input type='text' name='news_subject' value='$news_subject' maxlength='64' class='textbox' style='width:300px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='100' class='tbl'>".$locale['476']."</td>\n";
echo "<td width='80%' class='tbl'><select name='news_cat' class='textbox'>\n<option value='0'>".$locale['477']."</option>\n".$cat_list."</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td valign='top' class='tbl'>".$locale['472']."</td>\n";
echo "<td class='tbl'><textarea name='news_body' cols='60' rows='8' class='textbox' style='width:300px;'>$news_body</textarea></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'></td><td class='tbl'>\n";
echo display_bbcodes("300px", "news_body", "inputform", "b|i|u|center|small|url|mail|img|quote|color|youtube");
echo "</td>\n</tr>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl'><br />\n";
echo "<label><input type='checkbox' name='line_breaks' value='yes'".$breaks." />".$locale['473']."</label><br /><br />\n";
echo "<input type='submit' name='preview_news' value='".$locale['474']."' class='button' />\n";
echo "<input type='submit' name='submit_news' value='".$locale['475']."' class='button' />\n</td>\n";
echo "</tr>\n</table>\n</form>\n";
closetable();
}
} elseif ($_GET['stype'] == "a") {
require_once INCLUDES."bbcode_include.php";
if (isset($_POST['submit_article'])) {
if ($_POST['article_subject'] != "" && $_POST['article_body'] != "") {
$submit_info['article_cat'] = isnum($_POST['article_cat']) ? $_POST['article_cat'] : "0";
$submit_info['article_subject'] = stripinput($_POST['article_subject']);
$submit_info['article_snippet'] = descript($_POST['article_snippet']);
$submit_info['article_body'] = descript($_POST['article_body']);
$submit_info['article_breaks'] = (isset($_POST['line_breaks']) ? "y" : "n");
$result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('a', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')");
add_to_title($locale['global_200'].$locale['500']);
opentable($locale['500']);
echo "<div style='text-align:center'><br />\n".$locale['510']."<br /><br />\n";
echo "<a href='submit.php?stype=a'>".$locale['511']."</a><br /><br />\n";
echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
closetable();
}
} else {
if (isset($_POST['preview_article'])) {
$article_cat = isnum($_POST['article_cat']) ? $_POST['article_cat'] : "0";
$article_subject = stripinput($_POST['article_subject']);
$article_snippet = phpentities(descript(stripslash($_POST['article_snippet'])));
$article_body = phpentities(descript(stripslash($_POST['article_body'])));
$breaks = (isset($_POST['line_breaks']) ? " checked='checked'" : "");
opentable($article_subject);
echo (isset($_POST['line_breaks']) ? nl2br(parseubb($article_body)) : parseubb($article_body));
closetable();
tablebreak();
}
if (!isset($_POST['preview_article'])) {
$article_cat = "0";
$article_subject = "";
$article_snippet = "";
$article_body = "";
$breaks = " checked='checked'";
}
$cat_list = ""; $sel = "";
add_to_title($locale['global_200'].$locale['500']);
opentable($locale['500']);
$result = dbquery("SELECT article_cat_id, article_cat_name FROM ".DB_ARTICLE_CATS." WHERE ".groupaccess("article_cat_access")." ORDER BY article_cat_name");
if (dbrows($result)) {
while ($data = dbarray($result)) {
if (isset($_POST['preview_article'])) { $sel = $article_cat == $data['article_cat_id'] ? " selected" : ""; }
$cat_list .= "<option value='".$data['article_cat_id']."'".$sel.">".$data['article_cat_name']."</option>\n";
}
echo $locale['520']."<br /><br />\n";
echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=a' onsubmit='return validateArticle(this);'>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
echo "<td width='100' class='tbl'>".$locale['521']."</td>\n";
echo "<td class='tbl'><select name='article_cat' class='textbox'>\n$cat_list</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['522']."</td>\n";
echo "<td class='tbl'><input type='text' name='article_subject' value='$article_subject' maxlength='64' class='textbox' style='width:300px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td valign='top' class='tbl'>".$locale['523']."</td>\n";
echo "<td class='tbl'><textarea name='article_snippet' cols='60' rows='3' class='textbox' style='width:300px;'>$article_snippet</textarea></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'></td><td class='tbl'>\n";
echo display_bbcodes("300px", "article_body", "inputform", "b|i|u|center|small|url|mail|img|color|youtube");
echo "</td>\n</tr>\n<tr>\n";
echo "<td valign='top' class='tbl'>".$locale['524']."</td>\n";
echo "<td class='tbl'><textarea name='article_body' cols='60' rows='8' class='textbox' style='width:300px;'>$article_body</textarea></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'></td><td class='tbl'>\n";
echo display_bbcodes("300px", "article_body", "inputform", "b|i|u|center|small|url|mail|img|color|youtube");
echo "</td>\n</tr>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl'><br />\n";
echo "<label><input type='checkbox' name='line_breaks' value='yes'".$breaks." />".$locale['525']."</label><br /><br />\n";
echo "<input type='submit' name='preview_article' value='".$locale['526']."' class='button' />\n";
echo "<input type='submit' name='submit_article' value='".$locale['527']."' class='button' />\n</td>\n";
echo "</tr>\n</table>\n</form>\n";
} else {
echo "<div style='text-align:center'><br />\n".$locale['551']."<br /><br />\n</div>\n";
}
closetable();
}
} elseif ($_GET['stype'] == "p") {
if (isset($_POST['submit_photo'])) {
require_once INCLUDES."photo_functions_include.php";
$error = "";
$submit_info['photo_title'] = stripinput($_POST['photo_title']);
$submit_info['photo_description'] = stripinput($_POST['photo_description']);
$submit_info['album_id'] = isnum($_POST['album_id']) ? $_POST['album_id'] : "0";
if (is_uploaded_file($_FILES['photo_pic_file']['tmp_name'])) {
$photo_types = array(".gif",".jpg",".jpeg",".png");
$photo_pic = $_FILES['photo_pic_file'];
$photo_name = strtolower(substr($photo_pic['name'], 0, strrpos($photo_pic['name'], ".")));
$photo_ext = strtolower(strrchr($photo_pic['name'],"."));
$photo_dest = PHOTOS."submissions/";
if (!preg_match("/^[-0-9A-Z_\[\]]+$/i", $photo_name)) {
$error = 1;
} elseif ($photo_pic['size'] > $settings['photo_max_b']){
$error = 2;
} elseif (!in_array($photo_ext, $photo_types)) {
$error = 3;
} else {
$photo_file = image_exists($photo_dest, $photo_name.$photo_ext);
move_uploaded_file($photo_pic['tmp_name'], $photo_dest.$photo_file);
chmod($photo_dest.$photo_file, 0644);
$imagefile = @getimagesize($photo_dest.$photo_file);
if (!verify_image($photo_dest.$photo_file)) {
$error = 3;
unlink($photo_dest.$photo_file);
} elseif ($imagefile[0] > $settings['photo_max_w'] || $imagefile[1] > $settings['photo_max_h']) {
$error = 4;
unlink($photo_dest.$photo_file);
} else {
$submit_info['photo_file'] = $photo_file;
}
}
}
add_to_title($locale['global_200'].$locale['570']);
opentable($locale['570']);
if (!$error) {
$result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('p', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')");
echo "<div style='text-align:center'><br />\n".$locale['580']."<br /><br />\n";
echo "<a href='submit.php?stype=p'>".$locale['581']."</a><br /><br />\n";
echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
} else {
echo "<div style='text-align:center'><br />\n".$locale['600']."<br /><br />\n";
if ($error == 1) { echo $locale['601']; }
elseif ($error == 2) { echo sprintf($locale['602'], $settings['photo_max_b']); }
elseif ($error == 3) { echo $locale['603']; }
elseif ($error == 4) { echo sprintf($locale['604'], $settings['photo_max_w'], $settings['photo_max_h']); }
echo "<br /><br />\n<a href='submit.php?stype=p'>".$locale['581']."</a><br /><br />\n</div>\n";
}
closetable();
} else {
$opts = "";
add_to_title($locale['global_200'].$locale['570']);
opentable($locale['570']);
$result = dbquery("SELECT album_id, album_title FROM ".DB_PHOTO_ALBUMS." WHERE ".groupaccess("album_access")." ORDER BY album_title");
if (dbrows($result)) {
while ($data = dbarray($result)) $opts .= "<option value='".$data['album_id']."'>".$data['album_title']."</option>\n";
echo $locale['620']."<br /><br />\n";
echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=p' enctype='multipart/form-data' onsubmit='return validatePhoto(this);'>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
echo "<td class='tbl'>".$locale['621']."</td>\n";
echo "<td class='tbl'><input type='text' name='photo_title' maxlength='100' class='textbox' style='width:250px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td valign='top' class='tbl'>".$locale['622']."</td>\n";
echo "<td class='tbl'><textarea name='photo_description' cols='60' rows='5' class='textbox' style='width:300px;'></textarea></td>\n";
echo "</tr>\n<tr>\n";
echo "<td valign='top' class='tbl'>".$locale['623']."</td>\n";
echo "<td class='tbl'><label><input type='file' name='photo_pic_file' class='textbox' style='width:250px;' /><br />\n";
echo "<span class='small2'>".sprintf($locale['624'], parsebytesize($settings['photo_max_b']), $settings['photo_max_w'], $settings['photo_max_h'])."</span></label></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl'>".$locale['625']."</td>\n";
echo "<td class='tbl'><select name='album_id' class='textbox'>\n$opts</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl'><br />\n";
echo "<input type='submit' name='submit_photo' value='".$locale['626']."' class='button' />\n</td>\n";
echo "</tr>\n</table>\n</form>\n";
} else {
echo "<div style='text-align:center'><br />\n".$locale['551']."<br /><br />\n</div>\n";
}
closetable();
}
} else {
redirect("index.php");
}
echo "<script type='text/javascript'>
function validateLink(frm) {
if (frm.link_name.value==\"\" || frm.link_name.value==\"\" || frm.link_description.value==\"\") {
alert(\"".$locale['550']."\"); return false;
}
}
function validateNews(frm) {
if (frm.news_subject.value==\"\" || frm.news_body.value==\"\") {
alert(\"".$locale['550']."\"); return false;
}
}
function validateArticle(frm) {
if (frm.article_subject.value==\"\" || frm.article_snippet.value==\"\" || frm.article_body.value==\"\") {
alert(\"".$locale['550']."\");
return false;
}
}
function validatePhoto(frm) {
if (frm.photo_title.value==\"\" || frm.photo_description.value==\"\" || frm.photo_pic_file.value==\"\") {
alert(\"".$locale['550']."\");
return false;
}
}
</script>\n";
require_once THEMES."templates/footer.php";
?>
Edytowane przez Pieka dnia 28.09.2010 01:10:10
|
|
|
|
Borys_B |
Dodany dnia 08.11.2010 00:21:36
|
Przedszkolak
Postów: 47
Data rejestracji: 13.08.2009 01:49
|
Nieśmiałe pytanie mam
Czy dało by się dodać BBcode do dodawania newsów, artów itp?
Tak by użytkownik miał dostęp do bbcode w czasie dodawania newsa.
Używam wersji 7.01.00
|
|
|
|
Pieka |
Dodany dnia 08.11.2010 00:30:05
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
A to jakis problem poszukac? W biezacym temacie zostalo to opisane oraz w osobnym o nazwie "BBCode w newsach dodawanych przez użytkowników".
Jestem jaki jestem
|
|
|
|
Borys_B |
Dodany dnia 08.11.2010 01:56:39
|
Przedszkolak
Postów: 47
Data rejestracji: 13.08.2009 01:49
|
Dzięki Pieka za nakierowanie:)
Przeczytałem na razie działy w forum: panele, tylko o 7.00 i 7.01. Modyfikację zostawiam na deser:P
Dołączam temat o którym wspominałeś.
http://www.php-fu...rowstart=0
Jak również rozwiązanie problemu braku emotek w newsach (u mnie się nie wyświetlały).
edycja plik theme.php i w render_news:
znajdź
".$news."
lub
".parseubb($news)."
zamień na
".parseubb(parsesmileys($news))."
Używam wersji 7.01.00
|
|
|
|
Chrusta |
Dodany dnia 10.11.2010 17:43:10
|
Przedszkolak
Postów: 5 Ostrzeżeń: 2
Data rejestracji: 07.11.2010 16:12
|
Witam.
Mam nadzieję, że mój post nie zostanie znów usunięty... :)
Posiadam PHP-Fusion w wersji 7.00.05 (tutaj można zobaczyć: www.hbservis.tk )
Mam taki problem:
Gdy wpisze jakiś kod w znaczniki (nawias kw.)code]
to przed każdym " (cudzysłowem) stawia mi \ (slasha).
Dzieje się to w artykułach i newsach. Dodatkowo nie ma tej ikonki "Pobierz kod źródłowy". Na forum jest dobrze. BBCode dodawałem wg. tego opisu: http://www.php-fu...ost_109175
Próbowałem czegoś takiego:
<?php
if (get_magic_quotes_gpc() == TRUE) {
ini_set('magic_quotes_gpc','off');
}
if (get_magic_quotes_gpc() == FALSE) {
print 'magic_quotes are off';
} else {
print 'magic_quotes are still on silly';
}
?>
I pokazuje się "magic_quotes are still on silly". Czyli z wyłączeniem magic_quotes lipa...
Jak to naprawić? Trochę szukałem, ale nie znalazłem rozwiązania mojego problemu...
Musi się jakoś dać to naprawić, przecież niemożliwe żeby się nie dało... W CODE umieszcza się kod źródłowy, w celu późniejszego np. skopiowania, a te slashe to uniemożliwiają...
Pozdrawiam. |
|
|
|
piciu |
Dodany dnia 10.12.2010 21:45:57
|
Przedszkolak
Postów: 3 Pomógł: 1
Data rejestracji: 25.09.2010 22:11
|
Borys_B napisał/a:
Nieśmiałe pytanie mam:)
Czy dało by się dodać BBcode do dodawania newsów, artów itp?
Tak by użytkownik miał dostęp do bbcode w czasie dodawania newsa.
Witam, oczywiście ze się da tak zrobić.
Mi na początku nie wychodziło nic z artykułami, ale w końcu udało się.
Zróbcie tak: wersja 7.01.xx w innych tez powinno działać.
Brak polskich znaków w opisie ale zrozumieć trzeba. No i program do tego. Ja używam Notepad++:
Zmiany do wersji 7.01.01. W starszych wersjach numery pozycji moga sie roznic.
Plik submit.php, znajdz linia 23:
if (!iMEMBER) { redirect("index.php"); }
i wklej ponizej:
include_once INCLUDES."bbcode_include.php";
Znajdz linia 97:
echo (isset($_POST['line_breaks']) ? nl2br($news_body) : $news_body);
i zamien na:
echo (isset($_POST['news_body']) ? nl2br(parseubb($news_body)) : parseubb($news_body));
Znajdz linia 130:
echo "<td align='center' colspan='2' class='tbl'><br />\n";
i wklej ponizej:
echo "<div class='tbl2' style='width:98%'>".display_bbcodes("99%", "news_body", "submit_form")."</div>\n";
Dla artykulow, znajdz linia 160:
echo (isset($_POST['line_breaks']) ? nl2br($article_body) : $article_body);
i zamien na:
echo (isset($_POST['article_body']) ? nl2br(parseubb(parsesmileys($article_body))) : $article_body);
Znajdz linia 197:
echo "<td align='center' colspan='2' class='tbl'><br />\n";
i wstaw ponizej:
echo "<div class='tbl2' style='width:98%'>".display_bbcodes("99%", "article_body", "submit_form")."</div>\n";
Testowane na wersji 7.01.01 german, englisch, polish dziala bez problemu.
+++++++++++++++++++
Aby BBCode bylo zamienione na HTML, edytuj plik administration/submissions.php, znajdz linia 216:
$news_body = phpentities(stripslashes($submit_criteria['news_body']));
i zamien na:
$news_body = parseubb(phpentities(stripslashes($submit_criteria['news_body'])));
Dla artykulow, linia 304:
$article_body = phpentities(stripslashes($submit_criteria['article_body']));
i zamien na:
$article_body = parseubb(phpentities(stripslashes($submit_criteria['article_body'])));
+++++++++++++++++++
Aby wstawiac tez BBCode edytuj plik administration/articles.php.
A żeby smileys było tez musisz skopiować folder smileys do głównego katalogu.
Życze powodzenia.
Edytowane przez Pieka dnia 16.07.2011 13:51:19
|
|
|
|
Borek |
Dodany dnia 19.03.2011 11:22:59
|
Bywalec
Postów: 399 Pomógł: 64
v7.02.05 Data rejestracji: 28.06.2009 19:38
|
Czy mógłby ktoś powiedzieć mi, jak dodać do tego jeszcze możliwość obecności emotek? Męczę ten kod, męczę i wymęczyć nie mogę. :( Oto kawałek pliku theme.php odpowiadający za newsy: function render_news($subject, $news, $info) {
echo "<h1 class='title'>$subject</h1>\n";
echo "<p class='meta'><small>\n";
echo newsposter($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']);
echo "</small></p>\n";
echo "<div class='entry'>".parseubb($news)."</div>\n";
Edytowane przez Borek dnia 19.03.2011 11:23:18
Nie pomagam przez GG, PW itp. Tylko tutaj.
|
|
|
|
Pieka |
Dodany dnia 19.03.2011 12:31:01
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
Zamien:
".parseubb($news)."
na:
".parseubb(parsesmileys($news))."
Jestem jaki jestem
|
|
|
|
Borek |
Dodany dnia 19.03.2011 19:47:54
|
Bywalec
Postów: 399 Pomógł: 64
v7.02.05 Data rejestracji: 28.06.2009 19:38
|
Kurczę. Byłem blisko. Nie miałem tylko jednego "" na końcu.
Dzięki wielkie.
Nie pomagam przez GG, PW itp. Tylko tutaj.
|
|
|
|
wolf3092 |
Dodany dnia 18.04.2011 22:39:21
|
Przedszkolak
Postów: 5
Data rejestracji: 13.04.2011 20:47
|
A ja mam taki problem, że w artykule nie działa mi opcja spoiler, a na niej najbardziej mi zależy. W newsach wszystko działa i ładnie się wyświetla. Jest po prostu ramka spoilera, ale nie ma opcji "Pokaż/ukryj". Robiłem dokładnie tak jak w instrukcji, ale coś nie działa. Ma ktoś pojęcie o co chodzi?
Spoiler pobrałem stąd - KLIK
Edytowane przez wolf3092 dnia 18.04.2011 22:40:03
|
|
|
|
piotreklobcio |
Dodany dnia 16.07.2011 12:03:23
|
Przedszkolak
Postów: 8 Ostrzeżeń: 1
Data rejestracji: 11.07.2011 14:34
|
Pieka napisał/a:
W przypadku artykulow dodajesz analogicznie jak w przypadku newsow, jednak w funkcji odpowiedzialnej za artykuly, a nie za newsy. To jest logiczne i rozumie sie samo przez sie.
Edytuj plik theme.php, znajdz w funkcji render_article:
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
Kliknij i zaczekaj na załadowanie kodu ...
i zamien na:
".parseubb($info['article_breaks'] == "y" ? nl2br($article) : $article)."
Kliknij i zaczekaj na załadowanie kodu ...
Nastepnie edytuj plik articles.php, znajdz ( linia ~113):
echo "<a href='".FUSION_SELF."?article_id=".$data['article_id']."'>".$data['article_subject']."</a>$new<br />\n".stripslashes($data['article_snippet']);
Kliknij i zaczekaj na załadowanie kodu ...
i zamien na:
echo "<a href='".FUSION_SELF."?article_id=".$data['article_id']."'>".$data['article_subject']."</a>$new<br />\n".parseubb(stripslashes($data['article_snippet']));
Kliknij i zaczekaj na załadowanie kodu ...
Jesli chcesz miec rowniez mozliwosc wstawiania bbcode, edytuj plik administration/ articles.php, znajdz ( linia ~27):
require_once INCLUDES."html_buttons_include.php";
Kliknij i zaczekaj na załadowanie kodu ...
i wstaw ponizej:
require_once INCLUDES."bbcode_include.php";
Kliknij i zaczekaj na załadowanie kodu ...
Nastepnie znajdz ( linia ~157):
if ($settings['tinymce_enabled'] != 1) {
Kliknij i zaczekaj na załadowanie kodu ...
i wstaw ponizej:
echo "<tr>\n<td class='tbl'></td>\n<td class='tbl'>".display_bbcodes("99%", "body")."</td>\n</tr>\n";
Kliknij i zaczekaj na załadowanie kodu ...
oraz ( linia ~166):
if ($settings['tinymce_enabled'] != 1) {
Kliknij i zaczekaj na załadowanie kodu ...
i wstaw ponizej:
echo "<tr>\n<td class='tbl'></td>\n<td class='tbl'>".display_bbcodes("99%", "body2")."</td>\n</tr>\n";
Kliknij i zaczekaj na załadowanie kodu ...
Nastepnym krokiem jest dodanie podgladu, co realizujemy w tym samym pliku.
Znajdz linie ~83:
echo $bodypreview."\n";
Kliknij i zaczekaj na załadowanie kodu ...
i zamien na:
echo parseubb($bodypreview)."\n";
Kliknij i zaczekaj na załadowanie kodu ...
oraz linie ~86:
echo $body2preview."\n";
Kliknij i zaczekaj na załadowanie kodu ...
i zamien na:
echo parseubb($body2preview)."\n";
Kliknij i zaczekaj na załadowanie kodu ...
Witam. Nie wiem czy to jest związane z wersją PHP Fusion czy z innym czynnikiem ale w moim pliku articles.php nie ma tej lini którą podał Pieka. Mój plik: <?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: articles.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."articles.php";
# Breadcrumbs
# Original Code from Rizald "Elyn" Maxwell
# Rewritten for 7.02 by MarcusG
$isTrue = false;
$str = "";
if (isset($_GET['article_id'])&& isnum($_GET['article_id'])){
$result = dbquery(
"SELECT ta.article_cat, tac.article_cat_name, ta.article_id, ta.article_subject FROM ".DB_ARTICLES." ta
LEFT JOIN ".DB_ARTICLE_CATS." tac ON ta.article_cat=tac.article_cat_id
WHERE article_id='".$_GET['article_id']."'"
);
if (dbrows($result)) {
$data = dbarray($result);
$str .= "<a href='".FUSION_SELF."'><strong>".$locale['404']."</strong></a>";
$str .= " » <a href='".FUSION_SELF."?cat_id=".$data['article_cat']."'>".$data['article_cat_name']."</a>";
$str .= " » <a href='".FUSION_SELF."?article_id=".$_GET['article_id']."'>".$data['article_subject']."</a>";
$isTrue = true;
}
} elseif (isset($_GET['cat_id']) && isnum($_GET['cat_id'])){
$result = dbquery(
"SELECT article_cat_name FROM ".DB_ARTICLE_CATS."
WHERE article_cat_id='".$_GET['cat_id']."'");
if (dbrows($result)) {
$data = dbarray($result);
$str .= "<a href='".FUSION_SELF."'><strong>".$locale['404']."</strong></a>";
$str .= " » <a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."'>".$data['article_cat_name']."</a>";
$isTrue = true;
}
}
if($isTrue){
opentable($locale['405']);
echo $str;
closetable();
}
# end of breadcrumbs
add_to_title($locale['global_200'].$locale['400']);
if (isset($_GET['article_id']) && isnum($_GET['article_id'])) {
$result = dbquery(
"SELECT ta.article_subject, ta.article_article, ta.article_breaks,
ta.article_datestamp, ta.article_reads, ta.article_allow_comments, ta.article_allow_ratings,
tac.article_cat_id, tac.article_cat_name,
tu.user_id, tu.user_name, tu.user_status
FROM ".DB_ARTICLES." ta
INNER JOIN ".DB_ARTICLE_CATS." tac ON ta.article_cat=tac.article_cat_id
LEFT JOIN ".DB_USERS." tu ON ta.article_name=tu.user_id
WHERE ".groupaccess('article_cat_access')." AND article_id='".$_GET['article_id']."' AND article_draft='0'"
);
if (dbrows($result)) {
require_once INCLUDES."comments_include.php";
require_once INCLUDES."ratings_include.php";
$data = dbarray($result);
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($_GET['rowstart'] == 0) { $result = dbquery("UPDATE ".DB_ARTICLES." SET article_reads=article_reads+1 WHERE article_id='".$_GET['article_id']."'"); }
$article = stripslashes($data['article_article']);
if (preg_match('<--PAGEBREAK-->', $article)) {
$article = explode("<--PAGEBREAK-->", $article);
} else {
$article = explode("<!-- pagebreak -->", $article);
}
$pagecount = count($article);
$article_subject = stripslashes($data['article_subject']);
$article_info = array(
"article_id" => $_GET['article_id'],
"cat_id" => $data['article_cat_id'],
"cat_name" => $data['article_cat_name'],
"user_id" => $data['user_id'],
"user_name" => $data['user_name'],
"user_status" => $data['user_status'],
"article_date" => $data['article_datestamp'],
"article_breaks" => $data['article_breaks'],
"article_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='A' AND comment_item_id='".$_GET['article_id']."'"),
"article_reads" => $data['article_reads'],
"article_allow_comments" => $data['article_allow_comments']
);
add_to_title($locale['global_201'].$article_subject);
echo "<!--pre_article-->";
render_article($article_subject, $article[$_GET['rowstart']], $article_info);
echo "<!--sub_article-->";
if ($pagecount > 1) {
echo "<div align='center' style='margin-top:5px;'>\n".makepagenav($_GET['rowstart'], 1, $pagecount, 3, FUSION_SELF."?article_id=".$_GET['article_id']."&")."\n</div>\n";
}
if ($data['article_allow_comments']) { showcomments("A", DB_ARTICLES, "article_id", $_GET['article_id'], FUSION_SELF."?article_id=".$_GET['article_id']); }
if ($data['article_allow_ratings']) { showratings("A", $_GET['article_id'], FUSION_SELF."?article_id=".$_GET['article_id']); }
} else {
redirect(FUSION_SELF);
}
} elseif (!isset($_GET['cat_id']) || !isnum($_GET['cat_id'])) {
opentable($locale['400']);
echo "<!--pre_article_idx-->\n";
//$result = dbquery("SELECT article_cat_id, article_cat_name, article_cat_description FROM ".DB_ARTICLE_CATS." WHERE ".groupaccess('article_cat_access')." ORDER BY article_cat_name");
// NEW QUERY
$result = dbquery(
"SELECT ac.article_cat_id, ac.article_cat_name, ac.article_cat_description, COUNT(a.article_cat) AS article_count FROM ".DB_ARTICLES." a
LEFT JOIN ".DB_ARTICLE_CATS." ac ON a.article_cat=ac.article_cat_id
WHERE ".groupaccess('ac.article_cat_access')."
GROUP BY ac.article_cat_id
ORDER BY ac.article_cat_name"
);
$rows = dbrows($result);
if ($rows) {
$counter = 0; $columns = 2;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) { echo "</tr>\n<tr>\n"; }
//$num = dbcount("(article_cat)", DB_ARTICLES, "article_cat='".$data['article_cat_id']."' AND article_draft='0'");
echo "<td valign='top' width='50%' class='tbl article_idx_cat_name'><!--article_idx_cat_name--><a href='".FUSION_SELF."?cat_id=".$data['article_cat_id']."'>".$data['article_cat_name']."</a> <span class='small2'>(".$data['article_count'].")</span>";
if ($data['article_cat_description'] != "") { echo "<br />\n<span class='small'>".$data['article_cat_description']."</span>"; }
echo "</td>\n";
$counter++;
}
echo "</tr>\n</table>\n";
} else {
echo "<div style='text-align:center'><br />\n".$locale['401']."<br /><br />\n</div>\n";
}
echo "<!--sub_article_idx-->\n";
closetable();
} else {
$res = 0;
$result = dbquery("SELECT article_cat_name, article_cat_sorting, article_cat_access FROM ".DB_ARTICLE_CATS." WHERE article_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['article_cat_access'])) {
$res = 1;
add_to_title($locale['global_201'].$cdata['article_cat_name']);
opentable($locale['400'].": ".$cdata['article_cat_name']);
echo "<!--pre_article_cat-->";
$rows = dbcount("(article_id)", DB_ARTICLES, "article_cat='".$_GET['cat_id']."' AND article_draft='0'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows != 0) {
$result = dbquery(
"SELECT article_id, article_subject, article_snippet, article_datestamp FROM ".DB_ARTICLES."
WHERE article_cat='".$_GET['cat_id']."' AND article_draft='0' ORDER BY ".$cdata['article_cat_sorting']." LIMIT ".$_GET['rowstart'].",".$settings['articles_per_page']
);
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
$class = ($i%2 ? "tbl1" : "tbl2");
if ($data['article_datestamp'] + 604800 > time() + ($settings['timeoffset'] * 3600)) {
$new = " <span class='small' style='color:green;'>[".$locale['402']."]</span>";
} else {
$new = "";
}
echo "<div class='".$class."'><strong><a href='".FUSION_SELF."?article_id=".$data['article_id']."'>".$data['article_subject']."</a></strong>".$new."<br />\n".stripslashes($data['article_snippet'])."</div>";
echo ($i != $numrows ? "<hr />\n" : "\n"); $i++;
}
echo "<!--sub_article_cat-->";
closetable();
if ($rows > $settings['articles_per_page']) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'], $settings['articles_per_page'], $rows, 3, FUSION_SELF."?cat_id=".$_GET['cat_id']."&")."\n</div>\n";
} else {
echo "<div style='text-align:center'>".$locale['403']."</div>\n";
echo "<!--sub_article_cat-->";
closetable();
}
}
}
if ($res == 0) { redirect(FUSION_SELF); }
}
require_once THEMES."templates/footer.php";
?> Kliknij i zaczekaj na załadowanie kodu ... |
|
|
|
Sony |
Dodany dnia 16.07.2011 12:54:05
|
Początkujący
Postów: 253 Pomógł: 19 Ostrzeżeń: 1
v7.02.06 Data rejestracji: 19.04.2008 16:21
|
Bo instrukcja była pisana pod starą wersję PF.
U Ciebie jest to linia 351.
echo "<div class='".$class."'><strong><a href='".FUSION_SELF."?article_id=".$data['article_id']."'>".$data['article_subject']."</a></strong>".$new."<br />\n".stripslashes($data['article_snippet'])."</div>";
i zmieniasz na:
echo "<div class='".$class."'><strong><a href='".FUSION_SELF."?article_id=".$data['article_id']."'>".$data['article_subject']."</a></strong>".$new."<br />\n".parseubb(stripslashes($data['article_snippet']))."</div>";
tjaa
|
|
|
|
piotreklobcio |
Dodany dnia 16.07.2011 13:48:29
|
Przedszkolak
Postów: 8 Ostrzeżeń: 1
Data rejestracji: 11.07.2011 14:34
|
Pozamieniałem linijki według waszych (Sony i Pieka) wskazówek jednak tag hide (bo na nim mi zależy) nie działa. Inaczej mówiąc w tekście widać nawiasy kwadratowe i właśnie ten tag. Moglibyście sprawdzić jaki błąd popełniłem.
Plik theme.php:
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
define("THEME_BULLET", "<span class='bullet'>·</span>");
require_once INCLUDES."theme_functions_include.php";
function render_page($license = false) {
global $settings, $main_style, $locale, $mysql_queries_time;
//Header
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='full-header'>\n".showbanners()."</td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='sub-header-left'></td>\n";
echo "<td class='sub-header'>".showsublinks(" ".THEME_BULLET." ", "white")."</td>\n";
echo "<td align='right' class='sub-header'>".showsubdate()."</td>\n";
echo "<td class='sub-header-right'></td>\n";
echo "</tr>\n</table>\n";
//Content
echo "<table cellpadding='0' cellspacing='0' width='100%' class='$main_style'>\n<tr>\n";
if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
echo "</tr>\n</table>\n";
//Footer
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='sub-header-left'></td>\n";
echo "<td align='left' class='sub-header'>".showrendertime()."</td>\n";
echo "<td align='right' class='sub-header'>".showcounter()."</td>\n";
echo "<td class='sub-header-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='center' class='main-footer'>".stripslashes($settings['footer']);
if (!$license) { echo "<br /><br />\n".showcopyright(); }
echo "</td>\n";
echo "</tr>\n</table>\n";
/*foreach ($mysql_queries_time as $query) {
echo $query[0]." QUERY: ".$query[1]."<br />";
}*/
}
/* New in v7.02 - render comments */
function render_comments($c_data, $c_info){
global $locale;
opentable($locale['c100']);
if (!empty($c_data)){
echo "<div class='comments floatfix'>\n";
$c_makepagenav = '';
if ($c_info['c_makepagenav'] !== FALSE) {
echo $c_makepagenav = "<div style='text-align:center;margin-bottom:5px;'>".$c_info['c_makepagenav']."</div>\n";
}
foreach($c_data as $data) {
echo "<div class='tbl2'>\n";
if ($data['edit_dell'] !== FALSE) {
echo "<div style='float:right' class='comment_actions'>".$data['edit_dell']."\n</div>\n";
}
echo "<a href='".FUSION_REQUEST."#c".$data['comment_id']."' id='c".$data['comment_id']."' name='c".$data['comment_id']."'>#".$data['i']."</a> |\n";
echo "<span class='comment-name'>".$data['comment_name']."</span>\n";
echo "<span class='small'>".$data['comment_datestamp']."</span>\n";
echo "</div>\n<div class='tbl1 comment_message'>".$data['comment_message']."</div>\n";
}
echo $c_makepagenav;
if ($c_info['admin_link'] !== FALSE) {
echo "<div style='float:right' class='comment_admin'>".$c_info['admin_link']."</div>\n";
}
echo "</div>\n";
} else {
echo $locale['c101']."\n";
}
closetable();
}
function render_news($subject, $news, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$subject."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
echo "<td class='main-body middle-border'>".$info['cat_image'].$news."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' class='news-footer middle-border'>\n";
echo newsposter($info," ·").newscat($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']);
echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:5px;background-color:#f6a504;'></td>\n";
echo "</tr>\n</table>\n";
}
function render_article($subject, $article, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$subject."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
echo "<td class='main-body middle-border'>".parseubb($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' class='news-footer'>\n";
echo articleposter($info," ·").articlecat($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']);
echo "</td>\n</tr>\n</table>\n";
}
function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$title."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='main-body'>\n";
}
function closetable() {
echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:5px;background-color:#f6a504;'></td>\n";
echo "</tr>\n</table>\n";
}
function openside($title, $collapse = false, $state = "on") {
global $panel_collapse; $panel_collapse = $collapse;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='scapmain-left'></td>\n";
echo "<td class='scapmain'>".$title."</td>\n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<td class='scapmain' align='right'>".panelbutton($state, $boxname)."</td>\n";
}
echo "<td class='scapmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='side-body'>\n";
if ($collapse == true) { echo panelstate($state, $boxname); }
}
function closeside() {
global $panel_collapse;
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>\n</tr>\n</table>\n";
}
?>
Plik articles.php z głównego folderu:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: articles.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."articles.php";
# Breadcrumbs
# Original Code from Rizald "Elyn" Maxwell
# Rewritten for 7.02 by MarcusG
$isTrue = false;
$str = "";
if (isset($_GET['article_id'])&& isnum($_GET['article_id'])){
$result = dbquery(
"SELECT ta.article_cat, tac.article_cat_name, ta.article_id, ta.article_subject FROM "
.DB_ARTICLES." ta
LEFT JOIN "
.DB_ARTICLE_CATS." tac ON ta.article_cat=tac.article_cat_id
WHERE article_id='"
.$_GET['article_id']."'"
);
if (dbrows($result)) {
$data = dbarray($result);
$str .= "<a href='".FUSION_SELF."'><strong>".$locale['404']."</strong></a>";
$str .= " » <a href='".FUSION_SELF."?cat_id=".$data['article_cat']."'>".$data['article_cat_name']."</a>";
$str .= " » <a href='".FUSION_SELF."?article_id=".$_GET['article_id']."'>".$data['article_subject']."</a>";
$isTrue = true;
}
} elseif (isset($_GET['cat_id']) && isnum($_GET['cat_id'])){
$result = dbquery(
"SELECT article_cat_name FROM "
.DB_ARTICLE_CATS."
WHERE article_cat_id='"
.$_GET['cat_id']."'");
if (dbrows($result)) {
$data = dbarray($result);
$str .= "<a href='".FUSION_SELF."'><strong>".$locale['404']."</strong></a>";
$str .= " » <a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."'>".$data['article_cat_name']."</a>";
$isTrue = true;
}
}
if($isTrue){
opentable($locale['405']);
echo $str;
closetable();
}
# end of breadcrumbs
add_to_title($locale['global_200'].$locale['400']);
if (isset($_GET['article_id']) && isnum($_GET['article_id'])) {
$result = dbquery(
"SELECT ta.article_subject, ta.article_article, ta.article_breaks,
ta.article_datestamp, ta.article_reads, ta.article_allow_comments, ta.article_allow_ratings,
tac.article_cat_id, tac.article_cat_name,
tu.user_id, tu.user_name, tu.user_status
FROM "
.DB_ARTICLES." ta
INNER JOIN "
.DB_ARTICLE_CATS." tac ON ta.article_cat=tac.article_cat_id
LEFT JOIN "
.DB_USERS." tu ON ta.article_name=tu.user_id
WHERE "
.groupaccess('article_cat_access')." AND article_id='".$_GET['article_id']."' AND article_draft='0'"
);
if (dbrows($result)) {
require_once INCLUDES."comments_include.php";
require_once INCLUDES."ratings_include.php";
$data = dbarray($result);
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($_GET['rowstart'] == 0) { $result = dbquery("UPDATE ".DB_ARTICLES." SET article_reads=article_reads+1 WHERE article_id='".$_GET['article_id']."'"); }
$article = stripslashes($data['article_article']);
if (preg_match('<--PAGEBREAK-->', $article)) {
$article = explode("<--PAGEBREAK-->", $article);
} else {
$article = explode("<!-- pagebreak -->", $article);
}
$pagecount = count($article);
$article_subject = stripslashes($data['article_subject']);
$article_info = array(
"article_id" => $_GET['article_id'],
"cat_id" => $data['article_cat_id'],
"cat_name" => $data['article_cat_name'],
"user_id" => $data['user_id'],
"user_name" => $data['user_name'],
"user_status" => $data['user_status'],
"article_date" => $data['article_datestamp'],
"article_breaks" => $data['article_breaks'],
"article_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='A' AND comment_item_id='".$_GET['article_id']."'"),
"article_reads" => $data['article_reads'],
"article_allow_comments" => $data['article_allow_comments']
);
add_to_title($locale['global_201'].$article_subject);
echo "<!--pre_article-->";
render_article($article_subject, $article[$_GET['rowstart']], $article_info);
echo "<!--sub_article-->";
if ($pagecount > 1) {
echo "<div align='center' style='margin-top:5px;'>\n".makepagenav($_GET['rowstart'], 1, $pagecount, 3, FUSION_SELF."?article_id=".$_GET['article_id']."&")."\n</div>\n";
}
if ($data['article_allow_comments']) { showcomments("A", DB_ARTICLES, "article_id", $_GET['article_id'], FUSION_SELF."?article_id=".$_GET['article_id']); }
if ($data['article_allow_ratings']) { showratings("A", $_GET['article_id'], FUSION_SELF."?article_id=".$_GET['article_id']); }
} else {
redirect(FUSION_SELF);
}
} elseif (!isset($_GET['cat_id']) || !isnum($_GET['cat_id'])) {
opentable($locale['400']);
echo "<!--pre_article_idx-->\n";
//$result = dbquery("SELECT article_cat_id, article_cat_name, article_cat_description FROM ".DB_ARTICLE_CATS." WHERE ".groupaccess('article_cat_access')." ORDER BY article_cat_name");
// NEW QUERY
$result = dbquery(
"SELECT ac.article_cat_id, ac.article_cat_name, ac.article_cat_description, COUNT(a.article_cat) AS article_count FROM "
.DB_ARTICLES." a
LEFT JOIN "
.DB_ARTICLE_CATS." ac ON a.article_cat=ac.article_cat_id
WHERE "
.groupaccess('ac.article_cat_access'
)."
GROUP BY ac.article_cat_id
ORDER BY ac.article_cat_name"
);
$rows = dbrows($result);
if ($rows) {
$counter = 0; $columns = 2;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) { echo "</tr>\n<tr>\n"; }
//$num = dbcount("(article_cat)", DB_ARTICLES, "article_cat='".$data['article_cat_id']."' AND article_draft='0'");
echo "<td valign='top' width='50%' class='tbl article_idx_cat_name'><!--article_idx_cat_name--><a href='".FUSION_SELF."?cat_id=".$data['article_cat_id']."'>".$data['article_cat_name']."</a> <span class='small2'>(".$data['article_count'].")</span>";
if ($data['article_cat_description'] != "") { echo "<br />\n<span class='small'>".$data['article_cat_description']."</span>"; }
echo "</td>\n";
$counter++;
}
echo "</tr>\n</table>\n";
} else {
echo "<div style='text-align:center'><br />\n".$locale['401']."<br /><br />\n</div>\n";
}
echo "<!--sub_article_idx-->\n";
closetable();
} else {
$res = 0;
$result = dbquery("SELECT article_cat_name, article_cat_sorting, article_cat_access FROM ".DB_ARTICLE_CATS." WHERE article_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['article_cat_access'])) {
$res = 1;
add_to_title($locale['global_201'].$cdata['article_cat_name']);
opentable($locale['400'].": ".$cdata['article_cat_name']);
echo "<!--pre_article_cat-->";
$rows = dbcount("(article_id)", DB_ARTICLES, "article_cat='".$_GET['cat_id']."' AND article_draft='0'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows != 0) {
$result = dbquery(
"SELECT article_id, article_subject, article_snippet, article_datestamp FROM "
.DB_ARTICLES."
WHERE article_cat='"
.$_GET['cat_id']."' AND article_draft='0' ORDER BY ".$cdata['article_cat_sorting']." LIMIT ".$_GET['rowstart'].",".$settings['articles_per_page']
);
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
$class = ($i%2 ? "tbl1" : "tbl2");
if ($data['article_datestamp'] + 604800 > time() + ($settings['timeoffset'] * 3600)) {
$new = " <span class='small' style='color:green;'>[".$locale['402']."]</span>";
} else {
$new = "";
}
echo "<div class='".$class."'><strong><a href='".FUSION_SELF."?article_id=".$data['article_id']."'>".$data['article_subject']."</a></strong>".$new."<br />\n".parseubb(stripslashes($data['article_snippet']))."</div></a></strong>".$new."<br />\n".stripslashes($data['article_snippet'])."</div>";
echo ($i != $numrows ? "<hr />\n" : "\n"); $i++;
}
echo "<!--sub_article_cat-->";
closetable();
if ($rows > $settings['articles_per_page']) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'], $settings['articles_per_page'], $rows, 3, FUSION_SELF."?cat_id=".$_GET['cat_id']."&")."\n</div>\n";
} else {
echo "<div style='text-align:center'>".$locale['403']."</div>\n";
echo "<!--sub_article_cat-->";
closetable();
}
}
}
if ($res == 0) { redirect(FUSION_SELF); }
}
require_once THEMES."templates/footer.php";
?>
Plik articles.php z folderu administration:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: articles.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
if (!checkrights("A") || !defined("iAUTH") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) { redirect("../index.php"); }
require_once THEMES."templates/admin_header_mce.php";
include LOCALE.LOCALESET."admin/articles.php";
if ($settings['tinymce_enabled'] == 1) {
echo "<script language='javascript' type='text/javascript'>advanced();</script>\n";
} else {
require_once INCLUDES."html_buttons_include.php";
require_once INCLUDES."bbcode_include.php";
}
if (isset($_GET['status']) && !isset($message)) {
if ($_GET['status'] == "sn") {
$message = $locale['410'];
} elseif ($_GET['status'] == "su") {
$message = $locale['411'];
} elseif ($_GET['status'] == "del") {
$message = $locale['412'];
}
if ($message) { echo "<div id='close-message'><div class='admin-message'>".$message."</div></div>\n"; }
}
$result = dbcount("(article_cat_id)", DB_ARTICLE_CATS);
if (!empty($result)) {
if (isset($_POST['save'])) {
$subject = stripinput($_POST['subject']);
$body = addslash($_POST['body']);
$body2 = addslash($_POST['body2']);
$draft = isset($_POST['article_draft']) ? "1" : "0";
if ($settings['tinymce_enabled'] != 1) { $breaks = isset($_POST['line_breaks']) ? "y" : "n"; } else { $breaks = "n"; }
echo "<tr>\n<td class='tbl'></td>\n<td class='tbl'>".display_bbcodes("99%", "body")."</td>\n</tr>\n";
$comments = isset($_POST['article_comments']) ? "1" : "0";
$ratings = isset($_POST['article_ratings']) ? "1" : "0";
if (isset($_POST['article_id']) && isnum($_POST['article_id'])) {
$result = dbquery("UPDATE ".DB_ARTICLES." SET article_cat='".intval($_POST['article_cat'])."', article_subject='$subject', article_snippet='$body', article_article='$body2', article_draft='$draft', article_breaks='$breaks', article_allow_comments='$comments', article_allow_ratings='$ratings' WHERE article_id='".$_POST['article_id']."'");
redirect(FUSION_SELF.$aidlink."&status=su");
} else {
$result = dbquery("INSERT INTO ".DB_ARTICLES." (article_cat, article_subject, article_snippet, article_article, article_draft, article_breaks, article_name, article_datestamp, article_reads, article_allow_comments, article_allow_ratings) VALUES ('".intval($_POST['article_cat'])."', '$subject', '$body', '$body2', '$draft', '$breaks', '".$userdata['user_id']."', '".time()."', '0', '$comments', '$ratings')");
redirect(FUSION_SELF.$aidlink."&status=sn");
}
} else if (isset($_POST['delete']) && (isset($_POST['article_id']) && isnum($_POST['article_id']))) {
$result = dbquery("DELETE FROM ".DB_ARTICLES." WHERE article_id='".$_POST['article_id']."'");
$result = dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_item_id='".$_POST['article_id']."' and comment_type='A'");
$result = dbquery("DELETE FROM ".DB_RATINGS." WHERE rating_item_id='".$_POST['article_id']."' and rating_type='A'");
redirect(FUSION_SELF.$aidlink."&status=del");
} else {
if (isset($_POST['preview'])) {
$article_cat = $_POST['article_cat'];
$subject = stripinput($_POST['subject']);
$body = phpentities(stripslash($_POST['body']));
$body2 = phpentities(stripslash($_POST['body2']));
$bodypreview = str_replace("src='".str_replace("../", "", IMAGES_A), "src='".IMAGES_A, stripslash($_POST['body']));
$body2preview = str_replace("src='".str_replace("../", "", IMAGES_A), "src='".IMAGES_A, stripslash($_POST['body2']));
$draft = isset($_POST['article_draft']) ? " checked='checked'" : "";
if (isset($_POST['line_breaks'])) {
$breaks = " checked='checked'";
$bodypreview = nl2br($bodypreview);
$body2preview = nl2br($body2preview);
} else {
$breaks = "";
}
$comments = isset($_POST['article_comments']) ? " checked='checked'" : "";
$ratings = isset($_POST['article_ratings']) ? " checked='checked'" : "";
opentable($subject);
echo parseubb($bodypreview)."\n";
closetable();
opentable($subject);
echo parseubb($body2preview)."\n";
closetable();
}
$result = dbquery("SELECT article_id, article_subject, article_draft FROM ".DB_ARTICLES." ORDER BY article_draft DESC, article_datestamp DESC");
if (dbrows($result)) {
$editlist = ""; $sel = "";
while ($data = dbarray($result)) {
if ((isset($_POST['article_id']) && isnum($_POST['article_id'])) || (isset($_GET['article_id']) && isnum($_GET['article_id']))) {
$article_id = isset($_POST['article_id']) ? $_POST['article_id'] : $_GET['article_id'];
$sel = ($article_id == $data['article_id'] ? " selected='selected'" : "");
} else {
$sel = "";
}
$editlist .= "<option value='".$data['article_id']."'".$sel.">".($data['article_draft'] ? $locale['433']." " : "").$data['article_subject']."</option>\n";
}
opentable($locale['402']);
echo "<div style='text-align:center'>\n<form name='selectform' method='post' action='".FUSION_SELF.$aidlink."&action=edit'>\n";
echo "<select name='article_id' class='textbox' style='width:250px;'>\n".$editlist."</select>\n";
echo "<input type='submit' name='edit' value='".$locale['420']."' class='button' />\n";
echo "<input type='submit' name='delete' value='".$locale['421']."' onclick='return DeleteArticle();' class='button' />\n";
echo "</form>\n</div>\n";
closetable();
}
if ((isset($_GET['action']) && $_GET['action'] == "edit") && (isset($_POST['article_id']) && isnum($_POST['article_id'])) || (isset($_GET['article_id']) && isnum($_GET['article_id']))) {
$result = dbquery("SELECT article_cat, article_subject, article_snippet, article_article, article_draft, article_breaks, article_allow_comments, article_allow_ratings FROM ".DB_ARTICLES." WHERE article_id='".(isset($_POST['article_id']) ? $_POST['article_id'] : $_GET['article_id'])."'");
if (dbrows($result)) {
$data = dbarray($result);
$article_cat = $data['article_cat'];
$subject = $data['article_subject'];
$body = phpentities(stripslashes($data['article_snippet']));
$body2 = phpentities(stripslashes($data['article_article']));
$draft = $data['article_draft'] ? " checked='checked'" : "";
$breaks = $data['article_breaks'] == "y" ? " checked='checked'" : "";
$comments = $data['article_allow_comments'] ? " checked='checked'" : "";
$ratings = $data['article_allow_ratings'] ? " checked='checked'" : "";
} else {
redirect(FUSION_SELF.$aidlink);
}
}
if ((isset($_POST['article_id']) && isnum($_POST['article_id'])) || (isset($_GET['article_id']) && isnum($_GET['article_id']))) {
opentable($locale['401']);
} else {
if (!isset($_POST['preview'])) {
$subject = "";
$body = "";
$body2 = "";
$draft = "";
$breaks = " checked='checked'";
$comments = " checked='checked'";
$ratings = " checked='checked'";
}
opentable($locale['400']);
}
$result = dbquery("SELECT article_cat_id, article_cat_name FROM ".DB_ARTICLE_CATS." ORDER BY article_cat_name DESC");
$catlist = ""; $sel = "";
while ($data = dbarray($result)) {
if (isset($article_cat)) $sel = ($article_cat == $data['article_cat_id'] ? " selected='selected'" : "");
$catlist .= "<option value='".$data['article_cat_id']."'$sel>".$data['article_cat_name']."</option>\n";
}
echo "<form name='inputform' method='post' action='".FUSION_SELF.$aidlink."' onsubmit='return ValidateForm(this)'>\n";
echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
echo "<td width='100' class='tbl'>".$locale['422']."</td>\n";
echo "<td class='tbl'><select name='article_cat' class='textbox' style='width:250px;'>".$catlist."</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='100' class='tbl'>".$locale['423']."</td>\n";
echo "<td class='tbl'><input type='text' name='subject' value='$subject' class='textbox' style='width:250px;' /></td>\n";
echo "</tr>\n<tr>\n";
echo "<td valign='top' width='100' class='tbl'>".$locale['424']."</td>\n";
echo "<td class='tbl'><textarea name='body' cols='95' rows='5' class='textbox' style='width:98%'>".$body."</textarea></td>\n";
echo "</tr>\n";
if ($settings['tinymce_enabled'] != 1) {
echo "<tr>\n<td class='tbl'></td>\n<td class='tbl'>".display_bbcodes("99%", "body2")."</td>\n</tr>\n";
echo "<tr>\n<td class='tbl'></td>\n<td class='tbl'>\n";
echo display_html("inputform", "body", true, true, true, IMAGES_A);
echo "</td>\n</tr>\n";
}
echo "<tr>\n<td valign='top' width='100' class='tbl'>".$locale['425']."</td>\n";
echo "<td class='tbl'><textarea name='body2' cols='95' rows='10' class='textbox' style='width:98%'>".$body2."</textarea></td>\n";
echo "</tr>\n";
if ($settings['tinymce_enabled'] != 1) {
echo "<tr>\n<td class='tbl'></td><td class='tbl'>\n";
echo "<input type='button' value='".$locale['432']."' class='button' style='width:80px;' onclick=\"insertText('body2', '<--PAGEBREAK-->');\" />\n";
echo display_html("inputform", "body2", true, true, true, IMAGES_A);
echo "</td>\n</tr>\n";
}
echo "<tr>\n";
echo "<td class='tbl'></td><td class='tbl'>\n";
echo "<label><input type='checkbox' name='article_draft' value='yes'".$draft." /> ".$locale['426']."</label><br />\n";
if ($settings['tinymce_enabled'] != 1) { echo "<label><input type='checkbox' name='line_breaks' value='yes'".$breaks." /> ".$locale['427']."</label><br />\n"; }
echo "<label><input type='checkbox' name='article_comments' value='yes'".$comments." /> ".$locale['428']."</label>";
if ($settings['comments_enabled'] == "0") {
echo "<span style='color:red;font-weight:bold;margin-left:3px;'>*</span>";
}
echo "<br />\n";
echo "<label><input type='checkbox' name='article_ratings' value='yes'".$ratings." /> ".$locale['429']."</label>";
if ($settings['ratings_enabled'] == "0") {
echo "<span style='color:red;font-weight:bold;margin-left:3px;'>*</span>";
}
echo "</td>\n";
echo "</tr>\n";
if ($settings['comments_enabled'] == "0" || $settings['ratings_enabled'] == "0") {
$sys = "";
if ($settings['comments_enabled'] == "0" && $settings['ratings_enabled'] == "0") {
$sys = $locale['459'];
} elseif ($settings['comments_enabled'] == "0") {
$sys = $locale['457'];
} else {
$sys = $locale['458'];
}
echo "<tr>\n<td colspan='2' class='tbl1' style='font-weight:bold;text-align:left; color:black !important; background-color:#FFDBDB;'>";
echo "<span style='color:red;font-weight:bold;margin-right:5px;'>*</span>".sprintf($locale['456'], $sys);
echo "</td>\n</tr>";
}
echo "<tr>\n";
echo "<td align='center' colspan='2' class='tbl'><br />\n";
if ((isset($_POST['article_id']) && isnum($_POST['article_id'])) || (isset($_GET['article_id']) && isnum($_GET['article_id']))) {
echo "<input type='hidden' name='article_id' value='".(isset($_POST['article_id']) ? $_POST['article_id'] : $_GET['article_id'])."' />\n";
}
echo "<input type='submit' name='preview' value='".$locale['430']."' class='button' />\n";
echo "<input type='submit' name='save' value='".$locale['431']."' class='button' /></td>\n";
echo "</tr>\n</table>\n</form>\n";
closetable();
echo "<script type='text/javascript'>\n";
echo "/* <![CDATA[ */\n";
echo "function DeleteArticle() {\n";
echo "return confirm('".$locale['451']."');\n}\n";
echo "function ValidateForm(frm) {"."\n"."if(frm.subject.value=='') {\n";
echo "alert('".$locale['450']."');"."\n"."return false;\n}\n}\n";
echo "/* ]]>*/\n";
echo "</script>\n";
}
} else {
opentable($locale['403']);
echo "<div style='text-align:center'>".$locale['452']."<br />\n".$locale['453']."<br />\n";
echo "<a href='article_cats.php".$aidlink."'>".$locale['454']."</a>".$locale['455']."</div>\n";
closetable();
}
require_once THEMES."templates/footer.php";
?>
Edytowane przez Pieka dnia 16.07.2011 22:19:19
|
|
|
|
krystian1988 |
Dodany dnia 16.07.2011 18:53:29
|
Zaawansowany
Postów: 1187 Pomógł: 100
v7.02.07 Data rejestracji: 07.05.2009 17:37
|
Dziś udostępnił Craig na swojej stronie http://fangree.co.uk
paczkę która zawiera modyfikację BBCode w newsach jak i artykułach oraz z tego co widziałem jest nawet w submit. Działa na wersji PHP-Fusion v7.02.03.
krystian1988 dodał/a następującą plik:
Edytowane przez krystian1988 dnia 16.07.2011 18:54:45
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|
|
|
|
piotreklobcio |
Dodany dnia 16.07.2011 19:20:12
|
Przedszkolak
Postów: 8 Ostrzeżeń: 1
Data rejestracji: 11.07.2011 14:34
|
Problem rozwiązany okazało się że miałem wyłączony BBCode w Panelu Admina. Dzięki za pomoc wam.
Edytowane przez Pieka dnia 16.07.2011 22:16:31
|
|
|