Recenzje jako sklonowane artykuły
|
Hanys997 |
Dodany dnia 18.11.2008 17:12:51
|
Przedszkolak
Postów: 74
Data rejestracji: 08.10.2006 13:16
|
Witam !
Proszę o sprawdzenie czy tak ma wyglądać zapytanie aby sklonować artykuły , w moim przypadku mam zamiar stworzyć nie artykuly2 ale o nazwie Recenzje .
Dodanie tabelki kategorii Recenzji:
$result = dbquery("CREATE TABLE ".$db_prefix."recenzje_cats (
recenzje_cat_id SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
recenzje_cat_name VARCHAR(100) NOT NULL DEFAULT '',
recenzje_cat_description VARCHAR(200) NOT NULL DEFAULT '',
recenzje_cat_sorting VARCHAR(50) NOT NULL DEFAULT 'recenzje_subject ASC',
recenzje_cat_access TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (recenzje_cat_id)) TYPE=MyISAM;");
if($result) echo"Wpis dodano poprawnie";
Dodanie Recenzji:
$result = dbquery("CREATE TABLE ".$db_prefix."recenzje (
recenzje_id SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
recenzje_cat SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
recenzje_subject VARCHAR(200) NOT NULL DEFAULT '',
recenzje_snippet TEXT NOT NULL,
recenzje_article TEXT NOT NULL,
recenzje_breaks CHAR(1) NOT NULL DEFAULT '',
recenzje_name SMALLINT(5) UNSIGNED NOT NULL DEFAULT '1',
recenzje_datestamp INT(10) UNSIGNED NOT NULL DEFAULT '0',
recenzje_reads SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
recenzje_allow_comments TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
recenzje_allow_ratings TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (recenzje_id)) TYPE=MyISAM;");
if($result) echo"Wpis dodano poprawnie";
Uprawnienia Admina:
$result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('AC', 'recenzje_cats.gif', 'Kategorie Recenzji', 'recenzje_cats.php', 1)");
$result = dbquery("INSERT INTO ".$db_prefix."admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('A', 'recenzje.gif', 'Recenzje', 'recenzje.php', 1)");
if($result) echo"Wpis dodano poprawnie";
Z góry dzięki.
PW od moderatora:
- Przeniesienie tematu - Pieka 18.11 - 18:16
Edytowane przez Pieka dnia 18.11.2008 18:16:58
Pozdrawiam Hanys !
|
|
|
|
Wścibski Gość |
Dodany dnia 24.11.2024 17:30:16
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
kefirek |
Dodany dnia 18.11.2008 18:48:06
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Powinno być tak
GeSHi: PHP <?php define("DB_RECENZJE", DB_PREFIX ."recenzje"); } if (!defined("DB_RECENZJE_CATS")) { define("DB_RECENZJE_CATS", DB_PREFIX ."recenzje_cats"); } define("DB_ADMIN", DB_PREFIX ."admin"); } $result = dbquery("DROP TABLE IF EXISTS ".DB_RECENZJE_CATS.""); $result = dbquery("CREATE TABLE ".DB_RECENZJE_CATS." ( recenzje_cat_id SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT, recenzje_cat_name VARCHAR(100) NOT NULL DEFAULT '', recenzje_cat_description VARCHAR(200) NOT NULL DEFAULT '', recenzje_cat_sorting VARCHAR(50) NOT NULL DEFAULT 'recenzje_subject ASC', recenzje_cat_access TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (recenzje_cat_id)) TYPE=MyISAM;"); $result = dbquery("DROP TABLE IF EXISTS ".DB_RECENZJE.""); $result = dbquery("CREATE TABLE ".DB_RECENZJE." ( recenzje_id SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT, recenzje_cat SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', recenzje_subject VARCHAR(200) NOT NULL DEFAULT '', recenzje_snippet TEXT NOT NULL, recenzje_article TEXT NOT NULL, recenzje_breaks CHAR(1) NOT NULL DEFAULT '', recenzje_name SMALLINT(5) UNSIGNED NOT NULL DEFAULT '1', recenzje_datestamp INT(10) UNSIGNED NOT NULL DEFAULT '0', recenzje_reads SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', recenzje_allow_comments TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', recenzje_allow_ratings TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', PRIMARY KEY (recenzje_id)) TYPE=MyISAM;"); $result = dbquery("INSERT INTO ".DB_ADMIN." (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('AC', 'recenzje_cats.gif', 'Kategorie Recenzji', 'recenzje_cats.php', 1)"); $result = dbquery("INSERT INTO ".DB_ADMIN." (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('A', 'recenzje.gif', 'Recenzje', 'recenzje.php', 1)"); if ($result) { echo "Baza danych została utworzona poprawnie.<br>"; } else { echo "Błąd baza danych nie została utworzona.<br>"; } ?>
Zinterpretowano w sekund: 0.024, wykorzystano GeSHi 1.0.8.10
|
|
|
|
Hanys997 |
Dodany dnia 19.11.2008 17:25:46
|
Przedszkolak
Postów: 74
Data rejestracji: 08.10.2006 13:16
|
Witam !
Gdy wchodzę w /recenzje.php pojawia się następujący błąd:
Notice: Use of undefined constant DB_RECENZJE_CATS - assumed 'DB_RECENZJE_CATS' in /srv/www/vhosts/model-klub.pl/httpdocs/recenzje.php on line 70
Table 'modelklub.DB_RECENZJE_CATS' doesn't exist
Brak udostępnionych kategorii recenzji
W administracji kategoriami pojawia się zaś :
Notice: Use of undefined constant DB_RECENZJE_CATS - assumed 'DB_RECENZJE_CATS' in /srv/www/vhosts/model-klub.pl/httpdocs/administration/recenzje_cats.php on line 130
Table 'modelklub.DB_RECENZJE_CATS' doesn't exist
Gdy usiłuję wejść w administration/recenzje.php
Notice: Use of undefined constant DB_RECENZJE_CATS - assumed 'DB_RECENZJE_CATS' in /srv/www/vhosts/model-klub.pl/httpdocs/administration/recenzje.php on line 41
Table 'modelklub.DB_RECENZJE_CATS' doesn't exist
Prosiłbym o wszelaką pomoc :)
Edytowane przez Hanys997 dnia 19.11.2008 17:45:54
Pozdrawiam Hanys !
|
|
|
|
kefirek |
Dodany dnia 19.11.2008 17:44:26
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
W pliku recenzje.php dodaj
GeSHi: PHP define("DB_RECENZJE", DB_PREFIX ."recenzje"); } if (!defined("DB_RECENZJE_CATS")) { define("DB_RECENZJE_CATS", DB_PREFIX ."recenzje_cats"); }
Zinterpretowano w sekund: 0.027, wykorzystano GeSHi 1.0.8.10
Edytowane przez kefirek dnia 19.11.2008 17:47:22
|
|
|
|
Hanys997 |
Dodany dnia 19.11.2008 17:46:55
|
Przedszkolak
Postów: 74
Data rejestracji: 08.10.2006 13:16
|
OK. Ale w którym recenzje.php ? Zobacz zaktualizowałem posta.
Pozdrawiam Hanys !
|
|
|
|
kefirek |
Dodany dnia 19.11.2008 17:48:32
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
W tych dwóch plikach dodajesz ten kod co podałem wyżej |
|
|
|
Hanys997 |
Dodany dnia 19.11.2008 17:55:11
|
Przedszkolak
Postów: 74
Data rejestracji: 08.10.2006 13:16
|
W której linii mam to dodać ?
Pozdrawiam Hanys !
|
|
|
|
kefirek |
Dodany dnia 19.11.2008 17:56:55
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Najlepiej po tym
GeSHi: PHP require_once "maincore.php"; require_once THEMES."templates/header.php"; include LOCALE.LOCALESET."articles.php";
Zinterpretowano w sekund: 0.025, wykorzystano GeSHi 1.0.8.10
|
|
|
|
jedjak |
Dodany dnia 20.11.2008 21:33:42
|
Przedszkolak
Postów: 24 Ostrzeżeń: 1
Data rejestracji: 07.10.2006 16:18
|
Cześć. Mam problem, otóż także chce zrobił takie zdublowane "bgry". Otóż wchodzę do /articles/bgry_cats.php i wwyświetla się komunikat:
Notice: Use of undefined constant db_bgry_cats - assumed 'db_bgry_cats' in /administration/bgry_cats.php on line 131
Table 'elektus4.db_bgry_cats' doesn't exist
Proszę o pomoc
Linia 131:
$result = dbquery("SELECT * FROM ".db_bgry_cats." ORDER BY gry_cat_name");
Kliknij i zaczekaj na załadowanie kodu ...
PW od moderatora:
- Ogólna Uwaga - Pieka 20.11 - 21:51
Edytowane przez Pieka dnia 21.11.2008 19:53:25
|
|
|
|
Hanys997 |
Dodany dnia 20.11.2008 22:06:35
|
Przedszkolak
Postów: 74
Data rejestracji: 08.10.2006 13:16
|
Przeczytaj wszystkie posty w tym temacie . Jest tutaj poruszone wszystko i ten błąd także !
Pozdrawiam Hanys !
|
|
|
|
jedjak |
Dodany dnia 21.11.2008 19:34:02
|
Przedszkolak
Postów: 24 Ostrzeżeń: 1
Data rejestracji: 07.10.2006 16:18
|
Tak ale nie o cats. Mam ten kod co podał kefirek (błędy zniknęły w tych dwóch plikach ale nie w cats! W administracji!)
Problem naprawiony. Dzięki
Wiadomość doklejona:
Witam, Przepraszam za błędy. Niestety napotykam coraz to nowe błędy w bgry.php (nie w admin. tylko na portalu) wyświetla się komunikat po wejściu do danej kategorii. Jest on mianowicie taki:
Unknown column 'article_subject' in 'order clause'Unknown column 'article_subject' in 'order clause'
Proszę o pomoc. Wszystkie article_subject są podmienione pod gry_subject, niestety wyświetla się ten beznadziejny komunikat. Co mam zrobić?
Edytowane przez Pieka dnia 21.11.2008 20:46:00
|
|
|
|
Hanys997 |
Dodany dnia 21.11.2008 20:44:12
|
Przedszkolak
Postów: 74
Data rejestracji: 08.10.2006 13:16
|
Widocznie źle zedytowałeś pliki.
Pozdrawiam Hanys !
|
|
|
|
jedjak |
Dodany dnia 21.11.2008 20:53:39
|
Przedszkolak
Postów: 24 Ostrzeżeń: 1
Data rejestracji: 07.10.2006 16:18
|
Na pewno nie ma o tym wzmianki. Oto kod:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: bgry.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."bgry.php";
if (!defined("DB_BGRY")) {
define("DB_BGRY", DB_PREFIX."bgry");
}
if (!defined("DB_BGRY_CATS")) {
define("DB_BGRY_CATS", DB_PREFIX."bgry_cats");
}
add_to_title($locale['global_200'].$locale['400']);
if (isset($_GET['gry_id']) && isnum($_GET['gry_id'])) {
$result = dbquery(
"SELECT ta.*,tac.*, tu.user_id,user_name FROM ".DB_BGRY." ta
INNER JOIN ".DB_BGRY_CATS." tac ON ta.gry_cat=tac.gry_cat_id
LEFT JOIN ".DB_USERS." tu ON ta.gry_name=tu.user_id
WHERE ".groupaccess('gry_cat_access')." AND gry_id='".$_GET['gry_id']."' AND gry_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_BGRY." SET gry_reads=gry_reads+1 WHERE gry_id='".$_GET['gry_id']."'"); }
$article = stripslashes($data['gry_article']);
if (ereg('<--PAGEBREAK-->', $article)) {
$article = explode("<--PAGEBREAK-->", $article);
} else {
$article = explode("<!-- pagebreak -->", $article);
}
$pagecount = count($article);
$gry_subject = stripslashes($data['gry_subject']);
$gry_info = array(
"gry_id" => $data['gry_id'],
"user_id" => $data['user_id'],
"user_name" => $data['user_name'],
"gry_date" => $data['gry_datestamp'],
"gry_breaks" => $data['gry_breaks'],
"gry_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='A' AND comment_item_id='".$data['gry_id']."'"),
"gry_reads" => $data['gry_reads'],
"gry_allow_comments" => $data['gry_allow_comments']
);
add_to_title($locale['global_201'].$gry_subject);
echo "<!--pre_article-->";
render_article($gry_subject, $article[$_GET['rowstart']], $gry_info);
echo "<!--sub_article-->";
if ($pagecount > 1) {
echo "<div align='center' style='margin-top:5px;'>\n".makepagenav($_GET['rowstart'], 1, $pagecount, 3, FUSION_SELF."?gry_id=".$_GET['gry_id']."&")."\n</div>\n";
}
if ($data['gry_allow_comments']) { showcomments("A", DB_BGRY, "gry_id", $_GET['gry_id'], FUSION_SELF."?gry_id=".$_GET['gry_id']); }
if ($data['gry_allow_ratings']) { showratings("A", $_GET['gry_id'], FUSION_SELF."?gry_id=".$_GET['gry_id']); }
} else {
redirect(FUSION_SELF);
}
} elseif (!isset($_GET['cat_id']) || !isnum($_GET['cat_id'])) {
opentable($locale['400']);
echo "<!--pre_gry_idx-->\n";
$result = dbquery("SELECT * FROM ".DB_BGRY_CATS." WHERE ".groupaccess('gry_cat_access')." ORDER BY gry_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("(gry_cat)", DB_BGRY, "gry_cat='".$data['gry_cat_id']."' AND gry_draft='0'");
echo "<td valign='top' width='50%' class='tbl gry_idx_cat_name'><!--gry_idx_cat_name--><a href='".FUSION_SELF."?cat_id=".$data['gry_cat_id']."'>".$data['gry_cat_name']."</a> <span class='small2'>($num)</span>";
if ($data['gry_cat_description'] != "") { echo "<br />\n<span class='small'>".$data['gry_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_gry_idx-->\n";
closetable();
} else {
$res = 0;
$result = dbquery("SELECT * FROM ".DB_BGRY_CATS." WHERE gry_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['gry_cat_access'])) {
$res = 1;
add_to_title($locale['global_201'].$cdata['gry_cat_name']);
opentable($locale['400'].": ".$cdata['gry_cat_name']);
echo "<!--pre_gry_cat-->";
$rows = dbcount("(gry_id)", DB_BGRY, "gry_cat='".$_GET['cat_id']."' AND gry_draft='0'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows != 0) {
$result = dbquery(
"SELECT ta.gry_id, ta.gry_subject, ta.gry_snippet, ta.gry_datestamp FROM ".DB_BGRY." ta
WHERE gry_cat='".$_GET['cat_id']."' AND gry_draft='0' ORDER BY ".$cdata['gry_cat_sorting']." LIMIT ".$_GET['rowstart'].",15"
);
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['gry_datestamp'] + 604800 > time() + ($settings['timeoffset'] * 3600)) {
$new = " <span class='small'>[".$locale['402']."]</span>";
} else {
$new = "";
}
echo "<a href='".FUSION_SELF."?gry_id=".$data['gry_id']."'>".$data['gry_subject']."</a>$new<br />\n".stripslashes($data['gry_snippet']);
echo ($i != $numrows ? "<br /><br />\n" : "\n"); $i++;
}
echo "<!--sub_gry_cat-->";
closetable();
if ($rows > 15) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'], 15, $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_gry_cat-->";
closetable();
}
}
}
if ($res == 0) { redirect(FUSION_SELF); }
}
require_once THEMES."templates/footer.php";
?> Kliknij i zaczekaj na załadowanie kodu ...
Edytowane przez ICEK dnia 21.11.2008 21:00:46
|
|
|
|
Hanys997 |
Dodany dnia 21.11.2008 22:36:30
|
Przedszkolak
Postów: 74
Data rejestracji: 08.10.2006 13:16
|
Nie masz tej tabeli w bazie a jeśli masz to coś sknociłeś we wcześniejszych krokach
Pozdrawiam Hanys !
|
|
|
|
jedjak |
Dodany dnia 04.01.2009 17:25:14
|
Przedszkolak
Postów: 24 Ostrzeżeń: 1
Data rejestracji: 07.10.2006 16:18
|
Problem załatany. Teraz kwestia takiego błędu:
Wchodzę do artykułu i wyświetla się:
Notice: Undefined index: article_breaks in /themes/gfantasty/theme.php on line 226
Tytuł
Treść
Notice: Undefined index: article_date in /includes/theme_functions_include.php on line 134
Notice: Undefined index: article_allow_comments in /includes/theme_functions_include.php on line 135
Notice: Undefined index: article_allow_comments in /includes/theme_functions_include.php on line 141
Notice: Undefined index: article_reads in /includes/theme_functions_include.php on line 142
Notice: Undefined index: article_id in /includes/theme_functions_include.php on line 143
Notice: Undefined index: article_id in /themes/gfantasty/theme.php on line 233
Proszę o pomoc.
Wiadomość doklejona:
Naprawdę potrzebuję tej pomocy.
Wiadomość doklejona:
Plik poniżej:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: theme_functions_include.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).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
function check_panel_status($side) {
global $settings;
$exclude_list = "";
if ($side == "left") {
if ($settings['exclude_left'] != "") {
$exclude_list = explode("\r\n", $settings['exclude_left']);
}
} elseif ($side == "upper") {
if ($settings['exclude_upper'] != "") {
$exclude_list = explode("\r\n", $settings['exclude_upper']);
}
} elseif ($side == "lower") {
if ($settings['exclude_lower'] != "") {
$exclude_list = explode("\r\n", $settings['exclude_lower']);
}
} elseif ($side == "right") {
if ($settings['exclude_right'] != "") {
$exclude_list = explode("\r\n", $settings['exclude_right']);
}
}
if (is_array($exclude_list)) {
$script_url = explode("/", $_SERVER['PHP_SELF']);
$url_count = count($script_url);
$base_url_count = substr_count(BASEDIR, "/")+1;
$match_url = "";
while ($base_url_count != 0) {
$current = $url_count - $base_url_count;
$match_url .= "/".$script_url[$current];
$base_url_count--;
}
if (!in_array($match_url, $exclude_list) && !in_array($match_url.(FUSION_QUERY ? "?".FUSION_QUERY : ""), $exclude_list)) {
return true;
} else {
return false;
}
} else {
return true;
}
}
function showbanners() {
global $settings;
ob_start();
if ($settings['sitebanner2']) {
eval("?><div style='float: right;'>".stripslashes($settings['sitebanner2'])."</div>\n<?php ");
}
if ($settings['sitebanner1']) {
eval("?>".stripslashes($settings['sitebanner1'])."\n<?php ");
} elseif ($settings['sitebanner']) {
echo "<a href='".$settings['siteurl']."'><img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' style='border: 0;' /></a>\n";
} else {
echo "<a href='".$settings['siteurl']."'>".$settings['sitename']."</a>\n";
}
$output = ob_get_contents();
ob_end_clean();
return $output;
}
function showsublinks($sep = "·", $class = "") {
$sres = dbquery(
"SELECT link_window, link_visibility, link_url, link_name FROM ".DB_SITE_LINKS."
WHERE ".groupaccess('link_visibility')." AND link_position>='2' AND link_url!='---' ORDER BY link_order ASC"
);
if(dbrows($sres)) {
$i = 0;
$res = "<ul>\n";
while ($sdata = dbarray($sres)) {
$link_target = $sdata['link_window'] == "1" ? " target='_blank'" : "";
$li_class = ($i == 0 ? " class='first-link".($class ? " $class" : "")."'" : ($class ? " class='$class'" : ""));
if (strstr($sdata['link_url'], "http://") || strstr($sdata['link_url'], "https://")) {
$res .= "<li".$li_class.">".$sep."<a href='".$sdata['link_url']."'$link_target><span>".$sdata['link_name']."</span></a></li>\n";
} else {
$res .= "<li".$li_class.">".$sep."<a href='".BASEDIR.$sdata['link_url']."'$link_target><span>".$sdata['link_name']."</span></a></li>\n";
}
$i++;
}
$res .= "</ul>\n";
return $res;
}
}
function showsubdate() {
global $settings;
return ucwords(showdate($settings['subheaderdate'], time()));
}
function newsposter($info,$sep = "",$class = "") {
global $locale;
$res = "";
$link_class = $class ? " class='$class' " : "";
$res = THEME_BULLET." <a href='profile.php?lookup=".$info['user_id']."'".$link_class.">".$info['user_name']."</a> ";
$res .= $locale['global_071'].showdate("longdate", $info['news_date']);
$res .= $info['news_ext'] == "y" || $info['news_allow_comments'] ? $sep."\n" : "\n";
return "<!--news_poster-->".$res;
}
function newsopts($info, $sep, $class = "") {
global $locale; $res = "";
$link_class = $class ? " class='$class' " : "";
if (!isset($_GET['readmore']) && $info['news_ext'] == "y") $res = "<a href='news.php?readmore=".$info['news_id']."'".$link_class.">".$locale['global_072']."</a> ".$sep." ";
if ($info['news_allow_comments']) $res .= "<a href='news.php?readmore=".$info['news_id']."#comments'".$link_class.">".$info['news_comments'].($info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> ".$sep." ";
if ($info['news_ext'] == "y" || $info['news_allow_comments']) $res .= $info['news_reads'].$locale['global_074']."\n";
$res .= $sep." <a href='print.php?type=N&item_id=".$info['news_id']."'><img src='".get_image("printer")."' alt='".$locale['global_075']."' style='vertical-align:middle;border:0;' /></a>\n";
return "<!--news_opts-->".$res;
}
function articleposter($info, $sep = "", $class = "") {
global $locale; $res = "";
$link_class = $class ? " class='$class' " : "";
$res = THEME_BULLET." ".$locale['global_070']."<a href='profile.php?lookup=".$info['user_id']."'".$link_class.">".$info['user_name']."</a>\n";
$res .= $locale['global_071'].showdate("longdate", $info['article_date']);
$res .= $info['article_allow_comments'] ? $sep."\n" : "\n";
return "<!--article_poster-->".$res;
}
function articleopts($info, $sep) {
global $locale; $res = "";
if ($info['article_allow_comments']) { $res = "<a href='articles.php?article_id=".$info['article_id']."#comments'>".$info['article_comments'].($info['article_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> ".$sep."\n"; }
$res .= $info['article_reads'].$locale['global_074']." ".$sep."\n";
$res .= "<a href='print.php?type=A&item_id=".$info['article_id']."'><img src='".get_image("printer")."' alt='".$locale['global_075']."' style='vertical-align:middle;border:0;' /></a>\n";
return "<!--article_opts-->".$res;
}
function itemoptions($item_type, $item_id) {
global $locale, $aidlink; $res = "";
if ($item_type == "N") {
if (iADMIN && checkrights($item_type)) { $res .= "<!--article_news_opts--> · <a href='".ADMIN."news.php".$aidlink."&action=edit&news_id=".$item_id."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0;' /></a>\n"; }
} elseif ($item_type == "A") {
if (iADMIN && checkrights($item_type)) { $res .= "<!--article_admin_opts--> · <a href='".ADMIN."articles.php".$aidlink."&action=edit&article_id=".$item_id."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0;' /></a>\n"; }
}
return $res;
}
function showcopyright($class = "") {
$link_class = $class ? " class='$class' " : "";
$res = "Powered by <a href='http://www.php-fusion.co.uk'".$link_class.">PHP-Fusion</a> copyright © 2002 - ".date("Y")." by Nick Jones.<br />\n";
$res .= "Released as free software without warranties under <a href='http://www.fsf.org/licensing/licenses/agpl-3.0.html'".$link_class.">GNU Affero GPL</a> v3.\n";
return $res;
}
function showcounter() {
global $locale,$settings;
return "<!--counter-->".number_format($settings['counter'])." ".($settings['counter'] == 1 ? $locale['global_170'] : $locale['global_171']);
}
function panelbutton($state, $bname) {
if (isset($_COOKIE["fusion_box_".$bname])) {
if ($_COOKIE["fusion_box_".$bname] == "none") {
$state = "off";
} else {
$state = "on";
}
}
return "<img src='".get_image("panel_".($state == "on" ? "off" : "on"))."' id='b_$bname' class='panelbutton' alt='' onclick=\"javascript:flipBox('$bname')\" />";
}
function panelstate($state, $bname) {
if (isset($_COOKIE["fusion_box_".$bname])) {
if ($_COOKIE["fusion_box_".$bname] == "none") {
$state = "off";
} else {
$state = "on";
}
}
return "<div id='box_$bname'".($state == "off" ? " style='display:none'" : "").">\n";
}
// v6 compatibility
function opensidex($title, $state = "on") {
openside($title, true, $state);
}
function closesidex() {
closeside();
}
function tablebreak() {
return true;
}
?> Kliknij i zaczekaj na załadowanie kodu ...
Dodatkowo theme.php który został zakodowany przez Seba0p i wykonany na zamówienie oraz posiadający wiele skryptów:
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
// theme settings
$theme_width = "1002";
$theme_width_l = "210";
$theme_width_r = "210";
define("THEME_WIDTH", $theme_width);
define("THEME_BULLET", "<img src='".THEME."images/bullet.gif' alt='' style='border:0' />");
function render_page($license=false) {
global $theme_width,$settings,$db_prefix,$locale,$userdata,$data,$theme_width_l,$theme_width_r;
?>
<div id="reklamy">
<br />
<img alt="Baner długi" src="https://www.google.com/adsense/static/pl/images/leaderboard.gif" />
</div>
<?php
echo "<table align='center' cellspacing='0' cellpadding='0' width='$theme_width' class='outer-border'>
<tr>
<td>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='full-header'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td><img src='".THEME."grafika/gfantasy_02.jpg' alt='' /></td>
</tr>
</table>
</td>
</tr>
</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>
<td class='white-header' align='center'>";
?>
<div id="mytabsmenu" class="tabsmenuclass">
<ul>
<?php
link_obrazkowyomo("index.php","gfantasy_05","selected");
link_obrazkowyomo("index.php","gfantasy_06","none");
link_obrazkowyomo("index.php","gfantasy_07");
link_obrazkowyomo("index.php","gfantasy_08");
link_obrazkowyomo("index.php","gfantasy_09","none");
link_obrazkowyomo("index.php","gfantasy_10");
?>
</ul>
</div>
<div id="mysubmenuarea" class="tabsmenucontentclass">
<!--1st link within submenu container should point to the external submenu contents file-->
<a href="<?php echo THEME; ?>submenucontents.php" style="visibility:hidden">Sub Menu contents</a>
</div>
<script type="text/javascript">
//mouseovertabsmenu.init("tabs_container_id", "submenu_container_id", "bool_hidecontentsmouseout")
mouseovertabsmenu.init("mytabsmenu", "mysubmenuarea", true)
</script>
<?php
echo "</td>
</tr>
</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>
<td class='white-header' align='center'>";
echo "<img src='".THEME."grafika/gfantasy_12.gif' alt='' border='0' />";
echo "</td>
</tr>
<tr>
<td class='gornyinfopanel' valign='top'>\n\n";
// kod najnowszych recenzji
echo "<table cellpadding='0' cellspacing='0'>\n<tr>
<td style='padding:0px 20px 0px 20px'>
<table cellpadding='0' cellspacing='0'>\n<tr>
<td id='recenzjepanel'>";
@include "".THEME."recenzje/recenzje.php";
echo "</td>\n\n";
// kod najnowszych newsów
echo "<td id='newspanel'>";
@include "".THEME."newsy/newsy.php";
echo "</td></tr></table>
</td></tr></table>\n\n";
echo "</td>
</tr>
</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n
<tr>
<td class='gplogowanie' align='center'>";
@include "".THEME."logowanie.php";
echo "</td>
<td class='gpshoutbox'>";
echo "<table width='90%' cellpadding='0' cellspacing='0'>
<tr>
<td style='padding:16px 4px 5px 8px;'>";
@include "".THEME."shoutbox.php";
echo "</td>
</tr>
</table>";
echo "</td>
<td class='gpposty' valign='top'>";
echo "<table width='90%' cellpadding='0' cellspacing='0'>
<tr>
<td style='font-size:10px;color:#ddd;padding:36px 4px 5px 8px;'>";
@include "".THEME."tematy.php";
echo "</td>
</tr>
</table>";
echo "
</td>
<td class='gpstaty' valign='top'>";
echo "<table width='90%' cellpadding='0' cellspacing='0'>
<tr>
<td class='statystrony'>";
@include "".THEME."statystyki.php";
echo "</td>
</tr>
</table>";
echo "
</td>
</tr>
</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
if(LEFT){ echo"<td width='$theme_width_l' valign='top' class='side-border-left'>".LEFT."</td>"; }
echo"<td valign='top' class='main-bg'>".U_CENTER.CONTENT.L_CENTER."</td>";
if(RIGHT){ echo"<td width='$theme_width_r' valign='top' class='side-border-right'>".RIGHT."</td>"; }
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='center' class='footer'>";
echo"Powered by <a href='http://php-fusion.co.uk'>Php-Fusion v".$settings['version']."</a> | \n"; echo showcounter()." | Design æ Theme by <a href='http://kolumb-design.pl' class='stopka'>Kolumb</a>
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
echo '<div id="dolnepanele">';
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n
<tr>
<td class='dpgaleria'>";
echo "<table cellpadding='0' align='center' width='100%' cellspacing='0'>\n
<tr>
<td id='galeriapanel'>";
@include "".THEME."galeria/galeria.php";
echo "</td>
</tr>
</table>\n\n";
echo "</td>
<td class='dppartnerzy' valign='top' align='center'>";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n <br />";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n <br />";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n <br />";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n";
echo '<img alt="button" src="'.THEME.'grafika/button.gif" />'."\n <br />";
echo "</td>
</tr>
</table>\n";
echo '</div>';
}
function render_news($subject, $news, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='capmain'>:: $subject</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='main-body'>$news</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='center' class='news-footer'>\n";
echo newsposter($info," :: ").newsopts($info," :: ").itemoptions("N",$info['news_id']);
echo "</td>
</tr>
</table>\n";
}
function render_article($subject, $article, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='capmain'>:: $subject</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='main-body'>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='center' class='news-footer'>\n";
echo articleposter($info, " :: ").articleopts($info, " :: ").itemoptions("A",$info['article_id']);
echo "</td>
</tr>
</table>\n";
}
function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='capmain'>:: $title</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='main-body'>";
}
function closetable() {
echo "</td>
</tr>
</table>\n";
}
function openside($title, $collapse = false, $state = "on") {
global $panel_collapse, $userdata; $panel_collapse = $collapse;
if($collapse == true){
$boxname = str_replace(" ", "", $title);
}
$title2 = generujnazwe($title);
echo "<table cellpadding='0' cellspacing='0'>
<tr>
<td class='scapmain'><img src='".THEME."grafika/tytuly/$title2.gif' alt='' /></td>
</tr>
<tr>
<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>
</tr>
</table>\n";
echo"<div class='tablebreak'></div>";
}
function link_obrazkowyomo($adres,$obrazek,$czypodmenu="tak",$rozszerzenie="gif") {
$zakladka='rel="gotsubmenu"';
if ($czypodmenu=="tak") $zakladka='rel="gotsubmenu"';
if ($czypodmenu=="selected") $zakladka='rel="gotsubmenu[selected]"';
echo "<li><a href=\"".BASEDIR."";
echo "$adres\" $zakladka onmouseover='rollover$obrazek.src=\"".THEME."grafika/omo/";
echo "$obrazek";
echo ".";
echo "$rozszerzenie\"' onmouseout='rollover$obrazek.src=\"".THEME."grafika/";
echo "$obrazek";
echo ".";
echo "$rozszerzenie\"'><img src=\"".THEME."grafika/";
echo "$obrazek";
echo ".";
echo "$rozszerzenie\" name=\"rollover$obrazek\" alt=\"$obrazek\" border=\"0\" /></a></li> \n";
}
function generujnazwe ($title) {
global $data,$userdata;
$title2 = (iMEMBER && $title == $userdata['user_name']) ? "witaj" : $title;
$title2 = isset($userdata['user_name']) ? str_replace($userdata['user_name'], "", $title2) : $title2;
$title2=strtolower($title2);
$title2=strip_tags($title2);
$title2 = str_replace(" ", "", $title2);
$title2 = str_replace("±", "a", $title2);
$title2 = str_replace("ę", "e", $title2);
$title2 = str_replace("ó", "o", $title2);
$title2 = str_replace("¶", "s", $title2);
$title2 = str_replace("ł", "l", $title2);
$title2 = str_replace("ń", "n", $title2);
$title2 = str_replace("ż", "z", $title2);
$title2 = str_replace("ć", "c", $title2);
$title2 = str_replace("Ľ", "z", $title2);
$title2 = str_replace("±", "a", $title2);
$title2 = str_replace("ę", "e", $title2);
$title2 = str_replace("ó", "o", $title2);
$title2 = str_replace("¶", "s", $title2);
$title2 = str_replace("ł", "l", $title2);
$title2 = str_replace("ń", "n", $title2);
$title2 = str_replace("ż", "z", $title2);
$title2 = str_replace("ć", "c", $title2);
$title2 = str_replace("Ľ", "z", $title2);
$title2 = str_replace(".", "", $title2);
$title2 = str_replace("'", "", $title2);
$title2 = str_replace('"', "", $title2);
$title2 = str_replace(">", "", $title2);
$title2 = str_replace("<", "", $title2);
$title2 = str_replace("=", "", $title2);
$title2 = str_replace("\\", "", $title2);
$title2 = str_replace("\/", "", $title2);
$title2 = str_replace(":", "", $title2);
$title2 = str_replace("@", "", $title2);
return $title2;
}
?>
Kliknij i zaczekaj na załadowanie kodu ...
PW od moderatora:
- Odświeżenie Tematu - Pieka 04.01 - 17:25
Edytowane przez Pieka dnia 04.01.2009 17:26:17
|
|
|
|
rec18 |
Dodany dnia 12.01.2009 22:58:48
|
Przedszkolak
Postów: 2
Data rejestracji: 10.01.2009 11:23
|
Udało mi się z klonować artykuły ale mam problem komentarze mam ze starych artykułów. Czy da się zrobić inne panele tylko w tych skopiowanych artykułach jak tak to jak ?? |
|
|