|
str_replace
|
| Gugis |
parašyta 2008-09-01 19:36
|
Naujokas

Reputacija:
0
Pranešimai: 16
Įstojo: 2008-02-23
|
Noriu padaryti seo url bet kazkas nezigauna...
Error:
Notice: Use of undefined constant page_title - assumed 'page_title' in /xxx/xxx/xxx/includes/theme_functions_include.php on line 89
Notice: Undefined variable: row in /xxx/xxx/xxx/includes/theme_functions_include.php on line 89
ia dl to str_replace... O ia ta xujova vieta:
Code $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;
$title_start = preg_replace('/[^a-zA-Z0-9 *]/', '', $row[page_title]);
$title_seo = str_replace(' ', '-', $title_start);
$res = \"\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 .= \"- \".$sep.\"\".$sdata['link_name'].\"
\n\";
} else {
$res .= \"- \".$sep.\"\".$sdata['link_name'].\"
\n\";
}
$i++;
}
$res .= \" \n\";
return $res;
}
}
O bo?e moj... |
| |
|
|
| Nepster |
parašyta 2008-09-01 19:47
|

S.Administratorius

Reputacija:
0
Pranešimai: 670
Įstojo: 2007-01-02
|
Tau ir raso kad nera $row[] atrodo, auksciau matau if(dbrows($sres)) jei cia visas kodas tai $sres['page_title'] turetu but jei neklystu... |
| |
|
|
| Gugis |
parašyta 2008-09-01 20:57
|
Naujokas

Reputacija:
0
Pranešimai: 16
Įstojo: 2008-02-23
|
Dkui Nepster ;) Bet dar vienas erroras atsirado: Notice: Undefined index: news_subject in /home/gugis/test.kar.lt/includes/theme_functions_include.php on line 125
ia viso failo turinys:
Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| 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/licenses/agpl.html. 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(\"?>\".stripslashes($settings['sitebanner2']).\" \n
}
if ($settings['sitebanner1']) {
eval(\"?>\".stripslashes($settings['sitebanner1']).\"\n
} elseif ($settings['sitebanner']) {
echo \" \n\";
} else {
echo \"\".$settings['sitename'].\"\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 = \"\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 .= \"- \".$sep.\"\".$sdata['link_name'].\"
\n\";
} else {
$res .= \"- \".$sep.\"\".$sdata['link_name'].\"
\n\";
}
$i++;
}
$res .= \" \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.\" \".$info['user_name'].\" \";
$res .= $locale['global_071'].showdate(\"longdate\", $info['news_date']);
$res .= $info['news_ext'] == \"y\" || $info['news_allow_comments'] ? $sep.\"\n\" : \"\n\";
return \"\".$res;
}
function newsopts($info, $sep, $class = \"\") {
global $locale; $res = \"\";
$link_class = $class ? \" class='$class' \" : \"\";
if (!isset($_GET['readmore']) && $info['news_ext'] == \"y\") $res = \"\".$locale['global_072'].\" \".$sep.\" \";
if ($info['news_allow_comments']) $res .= \"\".$info['news_comments'].($info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073']).\" \".$sep.\" \";
if ($info['news_ext'] == \"y\" || $info['news_allow_comments']) $res .= $info['news_reads'].$locale['global_074'].\"\n\";
$res .= $sep.\" \n\";
return \"\".$res;
}
function articleposter($info, $sep = \"\", $class = \"\") {
global $locale; $res = \"\";
$link_class = $class ? \" class='$class' \" : \"\";
$res = THEME_BULLET.\" \".$locale['global_070'].\"\".$info['user_name'].\"\n\";
$res .= $locale['global_071'].showdate(\"longdate\", $info['article_date']);
$res .= $info['article_allow_comments'] ? $sep.\"\n\" : \"\n\";
return \"\".$res;
}
function articleopts($info, $sep) {
global $locale; $res = \"\";
if ($info['article_allow_comments']) { $res = \"\".$info['article_comments'].($info['article_comments'] == 1 ? $locale['global_073b'] : $locale['global_073']).\" \".$sep.\"\n\"; }
$res .= $info['article_reads'].$locale['global_074'].\" \".$sep.\"\n\";
$res .= \" \n\";
return \"\".$res;
}
function itemoptions($item_type, $item_id) {
global $locale, $aidlink; $res = \"\";
if ($item_type == \"N\") {
if (iADMIN && checkrights($item_type)) { $res .= \" \n\"; }
} elseif ($item_type == \"A\") {
if (iADMIN && checkrights($item_type)) { $res .= \" \n\"; }
}
return $res;
}
function showcopyright($class = \"\") {
$link_class = $class ? \" class='$class' \" : \"\";
$res = \"Powered by PHP-Fusion copyright © 2002 - \".date(\"Y\").\" by Nick Jones. \n\";
$res .= \"Released as free software without warranties under GNU Affero GPL v3.\n\";
return $res;
}
function showcounter() {
global $locale,$settings;
return \"\".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 \">\";
}
function panelstate($state, $bname) {
if (isset($_COOKIE[\"fusion_box_\".$bname])) {
if ($_COOKIE[\"fusion_box_\".$bname] == \"none\") {
$state = \"off\";
} else {
$state = \"on\";
}
}
return \"\n\";
}
// v6 compatibility
function opensidex($title, $state = \"on\") {
openside($title, true, $state);
}
function closesidex() {
closeside();
}
function tablebreak() {
return true;
}
?>
Redagavo MySQL Robotukas 2008-09-03 11:25
O bo?e moj... |
| |
|
|
| Gugis |
parašyta 2008-09-02 20:26
|
Naujokas

Reputacija:
0
Pranešimai: 16
Įstojo: 2008-02-23
|
?iauru :D Nei LT suporte, nei digio saite niekas nepadeda :D
O bo?e moj... |
| |
|
|
| MySQL Robotukas |
parašyta 2008-09-03 11:29
|

Draugas

Reputacija:
0
Pranešimai: 471
Įstojo: 2007-08-06
|
jis gi raso news_subject indedekso nera iseina uzklausa ziurek
# I`m a MAN !!!
# NIRVANA
SELECT user_name, GROUP_CONCAT(user_ip) as ip
FROM fusion_users
GROUP BY user_ip |
| |
|
|
| Gugis |
parašyta 2008-09-03 14:37
|
Naujokas

Reputacija:
0
Pranešimai: 16
Įstojo: 2008-02-23
|
bdZ, a? nbas :D
O bo?e moj... |
| |
|
|
| Gugis |
parašyta 2008-09-03 16:04
|
Naujokas

Reputacija:
0
Pranešimai: 16
Įstojo: 2008-02-23
|
Susitvarkiau ?it, bet vl problema atsirado.
Yra tokia u?klausa:
$result0 = dbquery("SELECT * FROM ".DB_NEWS."");
$data0 = dbarray($result0);
o kintamasis $data0['news_subject'] visada atvaizduoja pirmosios eiluts duomenis. Kas blogai?
Redagavo MySQL Robotukas 2008-09-03 21:04
O bo?e moj... |
| |
|
|
| MySQL Robotukas |
parašyta 2008-09-03 17:02
|

Draugas

Reputacija:
0
Pranešimai: 471
Įstojo: 2007-08-06
|
o kurios jis turi atvaizduoti?
# I`m a MAN !!!
# NIRVANA
SELECT user_name, GROUP_CONCAT(user_ip) as ip
FROM fusion_users
GROUP BY user_ip |
| |
|
|
| Gugis |
parašyta 2008-09-03 18:02
|
Naujokas

Reputacija:
0
Pranešimai: 16
Įstojo: 2008-02-23
|
ia a? ?aid?iu su readmore ir .hta... Vn? turi bti toks linkas naujiena-(id)-(naujienos-pavadinimas).html Bet man visada rodo pirmosios naujienos pavadinima.
O bo?e moj... |
| |
|
|
| MySQL Robotukas |
parašyta 2008-09-03 21:06
|

Draugas

Reputacija:
0
Pranešimai: 471
Įstojo: 2007-08-06
|
GeSHi: MySQL
Parsed in 0.007 seconds, using GeSHi 1.0.8.10
nu tai nurodyk koki id tu nori paimt!!!
# I`m a MAN !!!
# NIRVANA
SELECT user_name, GROUP_CONCAT(user_ip) as ip
FROM fusion_users
GROUP BY user_ip |
| |
|
|
| Gugis |
parašyta 2008-09-04 13:42
|
Naujokas

Reputacija:
0
Pranešimai: 16
Įstojo: 2008-02-23
|
aha... supratau... :(
O bo?e moj... |
| |
|