Content Management System - CMS : eXV2 
Home
News
Forum
Downloads
Download Module
Sitemap
Partnerseiten
RSS News
Kontakt/Info
Sprache
EnglishFrench
Suchen
Login
Nickname
Passwort

Registrieren?
Passwort?
Navigation
 Home News  Forum Neueste Beiträge  Downloads Download Module eXV² Themes  Weblinks Tutorial Changelog 2.3.1 Jobcenter Gebrauchtmarkt OSMap  Sponsor Kalendersystem Sitemap Partnerseiten RSS News Kontakt/Info Webseiten Wetter
Willkommen im Free Web CMS : eXV² Forum!
  Forenarchiv
     Scripte
  Habe den durchblick verloren !

Forum : Scripte

Titel : Habe den durchblick verloren !

© 2004-2012 www.exv2.de
http://www.exv2.de

URL dieser Diskussion
http://www.exv2.de/modules/newbb_plus/viewtopic.php?topic_id=1238&forum=13


 butzemanya :

29.04.2004 02:43
 Hi
Also ich bekomme das script nicht gebacken,vielleicht könnt ihr weiterhelfen und den schnipsel korigieren ist nur diese eine Seite zu machen,habe mich mal versucht aber die Datenbank abfrage und so naja .

Code:

<?php
include_once('../../mainfile.php');

global $db, $xoopsConfig;


if ( $xoopsConfig['startpage'] == "rgn-news" ) {
$xoopsOption['show_rblock'] =1;
include(XOOPS_ROOT_PATH."/header.php");
if ($News=="Y") {
make_cblock();
echo "<br />";
}
} else {
$xoopsOption['show_rblock'] =0;
include(XOOPS_ROOT_PATH."/header.php");
}

####################################################################
# options #
####################################################################

### options link
# ac = windows (news,box,title,scroll,ticker)
# ac2 = number news
# ac3 = topic


### General

$easy_name_rep = "rgn-news";
$tb_stories = $prefix."_stories";
$tb_topics = $prefix."_topics";


### box
$easy_color_top_box = "CACACA";
$easy_color_body_box = "FFFFFF";
$easy_color_border_box = "000000";
$easy_color_topic_box = "FF0000";
$easy_color_title_box = "000000";
$easy_color_date_box = "FF0000";
$easy_color_sitename_box = "000000";
$easy_widht_box = 500;
$easy_num_news_box = 5; # 5 news if ac2=0
$easy_topic_box = 0; # 0 all topics if ac3=0
$easy_gif_box ="rgn-news_75x20.gif"; # 75*20 (u can replace whith your logo)


### News
$easy_color_top_news = "CACACA";
$easy_color_body_news = "FFFFFF";
$easy_color_border_news = "000000";
$easy_color_foot_news = "CACACA";
$easy_color_topic_news = "FF0000";
$easy_color_date_news = "FF0000";
$easy_color_sitename_news = "000000";
$easy_widht_news = 150;
$easy_num_news_news = 5; # 5 news if ac2=0
$easy_topic_news = 0; # 0 all topics if ac3=0
$easy_gif_news ="rgn-news_mini.gif"; # 150*20 (u can replace whith your logo)


### Title
$easy_color_top_title = "CACACA";
$easy_color_body_title = "FFFFFF";
$easy_color_border_title = "000000";
$easy_color_foot_title = "CACACA";
$easy_color_topic_title = "FF0000";
$easy_color_date_title = "FF0000";
$easy_color_sitename_title = "000000";
$easy_widht_title = 150;
$easy_num_news_title = 5; # 5 news if ac2=0
$easy_topic_title = 0; # 0 all topics if ac3=0
$easy_gif_title = "rgn-news_mini.gif"; # 150*20 (u can replace whith your logo)


### Scroller
$easy_color_top_scroll = "CACACA";
$easy_color_body_scroll = "FFFFFF";
$easy_color_border_scroll = "000000";
$easy_color_foot_scroll = "000000";
$easy_color_topic_scroll = "FF0000";
$easy_color_date_scroll = "FF0000";
$easy_color_sitename_scroll = "000000";
$easy_widht_scroll = 150;
$easy_height_scroll = 150;
$easy_num_news_scroll = 5; # 5 news if ac2=0
$easy_topic_scroll = 0; # 0 all topics if ac3=0
$easy_gif_scroll = "rgn-news_big.gif"; # 150*150 (u can replace whith your logo)


### Ticker
$easy_color_body_ticker = "50000000";
$easy_widht_ticker = 300;
$easy_num_news_ticker = 5; # 5 news if ac2=0
$easy_topic_ticker = 0; # 0 all topics if ac3=0
$easy_gif_ticker = "rgn-news_52x20.gif"; # 52*20 (u can replace whith your logo)



####################################################################


$supcri="";// si topic
$easymod = "op=modload&amp;name=$easy_name_rep&amp;file=index";



function easy_jscript($jslo)
{
echo sprintf ("%s%s%s", "document.write('",$jslo,"');")."n";
}

function easy_clean($hometext,$lg)
{
$hometext = ereg_replace("<[^>]*>", "", $hometext);
$hometext = ereg_replace(13, " ", $hometext);
$hometext = ereg_replace(10, " ", $hometext);
$hometext = substr($hometext,0,$lg);
$hometext = chop(ereg_replace("'", "'",$hometext));
$hometext.=" ...";

return($hometext);
}

function easy_modhtml()
{
global $easy_name_rep,$easymod,$db,$tb_topics;

## Insert in easy_html.php your html code to present headlines partnership
##

$linknewsbox = XOOPS_ROOT_PATH."/modules.php?".$easymod."&amp;ac=news&amp;ac2=&amp;ac3=";
$linkboxbox = XOOPS_ROOT_PATH."/modules.php?".$easymod."&amp;ac=box&amp;ac2=&amp;ac3=";
$linktitlebox = XOOPS_ROOT_PATH."/modules.php?".$easymod."&amp;ac=title&amp;ac2=&amp;ac3=";
$linkscroller = XOOPS_ROOT_PATH."/modules.php?".$easymod."&amp;ac=scroller&amp;ac2=&amp;ac3=";
$linktickerbox = XOOPS_ROOT_PATH."/modules.php?".$easymod."&amp;ac=ticker&amp;ac2=&amp;ac3=";

$easyurl = XOOPS_ROOT_PATH."/modules.php?".$easymod."&amp;ac=";

$easytopic="";
$result= mysql_db_query($db,"select topic_id,topic_title from $tb_topics");
while(list($topic_id,$topic_title)= mysql_fetch_row($result))
{
$easytopic.="<OPTION VALUE="$topic_id"> $topic_titlen";
}

include("modules/$easy_name_rep/easy_html.php");

}

function easy_make_date($time)
{
ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $time, $day);
$date = $day[3].'/'.$day[2].'/'.$day[1];
return($date);
}

switch($ac) {

case news :

if ($ac3!=0)
{
$supcri="and $tb_stories.topic=".$ac3;
}else{
if ($easy_topic_box == 0)
{
$supcri="";
}else{
$supcri="and $tb_stories.topic=".$easy_topic_news;
}
}

if ($ac2==0){$ac2=$easy_num_news_news;}


$easy_widht_news-=4;
easy_jscript("<TABLE WIDTH=".$easy_widht_news." BORDER=1 CELLSPACING=0 cellpadding=2 bordercolor=".$easy_color_border_news.">");
easy_jscript("<TR><TD BGCOLOR=".$easy_color_top_news." bordercolor=".$easy_color_top_news."><FONT FACE=Verdana SIZE=2 COLOR=".$easy_color_sitename_news."><B>$sitename</B></FONT></TD></TR>");
easy_jscript("<TR><TD bgcolor=".$easy_color_body_news." bordercolor=".$easy_color_body_news.">");

$result = mysql_db_query($db,"SELECT $tb_stories.sid, $tb_stories.title, $tb_stories.time, $tb_stories.hometext, $tb_topics.topicname FROM $tb_stories,$tb_topics where $tb_topics.topicid=$tb_stories.topic $supcri ORDER BY $tb_stories.sid DESC limit $ac2");
while(list($sid,$title,$time,$hometext,$topicname) = mysql_fetch_row($result))
{

$title= chop(ereg_replace("'", "'",$title));
$text=easy_clean($hometext,100);
$topicname= ucfirst(chop(ereg_replace("'", "'",$topicname)));
$date_news=easy_make_date($time);

easy_jscript("<font FACE=Verdana size="1" color="".$easy_color_topic_news.""><b>".$topicname."</b> :</font>");
easy_jscript("<font FACE=Verdana size="1" color="".$easy_color_date_news."">".$date_news."</font>");
easy_jscript("<br><a href="".XOOPS_URL."/article.php?sid=".$sid."" target="_blank"><font size=1 face=Verdana ><b>".$text."</b></font></a><br><br>");
}
easy_jscript("</td></tr><tr><td BGCOLOR=".$easy_color_foot_news." bordercolor=".$easy_color_foot_news.">");
easy_jscript("<center><b><a href=".XOOPS_URL."/modules.php?".$easymod."&amp;ac=add" target=_blank><img src="./modules/'".$easy_name_rep."/".$easy_gif_news."" border==0></a></center>");
easy_jscript("</FONT></td></tr></table>");

break;


case box :

if ($ac3!=0)
{
$supcri="and $tb_stories.topic=".$ac3;
}else{
if ($easy_topic_box == 0)
{
$supcri="";
}else{
$supcri="and $tb_stories.topic=".$easy_topic_box;
}
}

if ($ac2==0){$ac2=$easy_num_news_box;}

easy_jscript("<TABLE WIDTH=".$easy_widht_box." BORDER=0 CELLSPACING=0 cellpadding=0 ><TR>");
easy_jscript("<td><a href=".XOOPS_URL."/modules.php?".$easymod."&amp;ac=add" target=_blank><img src="./modules/".$easy_name_rep."/".$easy_gif_box."" border=0></a></td>");
easy_jscript("<TD width=100% BGCOLOR=".$easy_color_top_box."><FONT FACE=Verdana SIZE=2 COLOR=".$easy_color_sitename_box."><B>".$sitename."</B></FONT></TD></TR>");
easy_jscript("<TR><TD colspan=2>");
easy_jscript("<table WIDTH=100% BORDER=1 CELLSPACING=1 cellpadding=3 bgcolor=".$easy_color_body_box." bordercolor=".$easy_color_border_box.">");
easy_jscript("<TR><TD bgcolor=".$easy_color_body_box." bordercolor=".$easy_color_body_box.">");

$result = mysql_db_query($db,"SELECT $tb_stories.sid, $tb_stories.title, $tb_stories.time, $tb_stories.hometext, $tb_topics.topicname FROM $tb_stories,$tb_topics where $tb_topics.topicid=$tb_stories.topic $supcri ORDER BY $tb_stories.sid DESC limit $ac2");
while(list($sid,$title,$time,$hometext,$topicname) = mysql_fetch_row($result))
{

$title= ucfirst(chop(ereg_replace("'", "'",$title)));
$text=easy_clean($hometext,300);
$topicname= ucfirst(chop(ereg_replace("'", "'",$topicname)));
$date_news=easy_make_date($time);

easy_jscript("<font FACE=Verdana size="2" color="".$easy_color_topic_box.""><b>".$topicname."</b> :</font>");
easy_jscript("<font FACE=Verdana size="1" color="".$easy_color_date_box."">".$date_news."</font>");
easy_jscript("<br><font FACE=Verdana size="2" color="".$easy_color_title_box.""><b>".$title."</b></font><br>");
easy_jscript("<a href="".XOOPS_URL."/article.php?sid=".$sid."" target="_blank"><font size=1 face=Verdana ><b>".$text."</b></font></a></font><br><br>");
}
easy_jscript("</td></tr></table>");
easy_jscript("</td></tr></table>");
break;

case title :

if ($ac3!=0)
{
$supcri="and $tb_stories.topic=".$ac3;
}else{
if ($easy_topic_title == 0)
{
$supcri="";
}else{
$supcri="and $tb_stories.topic=".$easy_topic_title;
}
}

if ($ac2==0){$ac2=$easy_num_news_title;}


$easy_widht_title-=4;
easy_jscript("<TABLE WIDTH=".$easy_widht_title." BORDER=1 CELLSPACING=0 cellpadding=2 bordercolor=".$easy_color_border_title.">");
easy_jscript("<TR><TD BGCOLOR=".$easy_color_top_title." bordercolor=".$easy_color_top_title."><FONT FACE=Verdana SIZE=2 COLOR=".$easy_color_sitename_title."><B>$sitename</B></FONT></TD></TR>");
easy_jscript("<TR><TD bgcolor=".$easy_color_body_title." bordercolor=".$easy_color_body_title.">");

$result = mysql_db_query($db,"SELECT $tb_stories.sid, $tb_stories.title, $tb_stories.time, $tb_stories.hometext, $tb_topics.topicname FROM $tb_stories,$tb_topics where $tb_topics.topicid=$tb_stories.topic $supcri ORDER BY $tb_stories.sid DESC limit $ac2");
while(list($sid,$title,$time,$hometext,$topicname) = mysql_fetch_row($result))
{

$title= chop(ereg_replace("'", "'",$title));
$topicname= ucfirst(chop(ereg_replace("'", "'",$topicname)));
$date_news=easy_make_date($time);

easy_jscript("<font FACE=Verdana size="1" color="".$easy_color_topic_title.""><b>".$topicname."</b> :</font>");
easy_jscript("<font FACE=Verdana size="1" color="".$easy_color_date_title."">".$date_news."</font>");
easy_jscript("<br><a href="".XOOPS_URL."/article.php?sid=".$sid."" target="_blank"><font size=1 face=Verdana ><b>".$title."</b></font></a><br><br>");
}
easy_jscript("</td></tr><tr><td BGCOLOR=".$easy_color_foot_title." bordercolor=".$easy_color_foot_title.">");
easy_jscript("<center><b><a href=".XOOPS_URL."/modules.php?".$easymod."&amp;ac=add" target=_blank><img src="./modules/".$easy_name_rep."/".$easy_gif_title."" border==0></a></center>");
easy_jscript("</FONT></td></tr></table>");
break;


case scroller:

if ($ac3!=0)
{
$supcri="and $tb_stories.topic=".$ac3;
}else{
if ($easy_topic_scroll == 0)
{
$supcri="";
}else{
$supcri="and $tb_stories.topic=".$easy_topic_scroll;
}
}

if ($ac2==0){$ac2=$easy_num_news_scroll;}
if ($ac2<2){$ac2=2;}

easy_jscript("<TABLE WIDTH=".$easy_widht_scroll." BORDER=1 CELLSPACING=0 cellpadding=2 bordercolor=".$easy_color_border_scroll.">");
easy_jscript("<TR><TD BGCOLOR=".$easy_color_top_scroll." bordercolor=".$easy_color_top_scroll."><FONT FACE=Verdana SIZE=2 COLOR=".$easy_color_sitename_scroll."><B>$sitename</B></FONT></TD></TR>");
easy_jscript("<TR><TD bgcolor=".$easy_color_body_scroll." bordercolor=".$easy_color_body_scroll.">");

echo "var scrollerwidth=$easy_widht_scrolln";
echo "var scrollerheight=$easy_height_scrolln";
echo "var scrollerbgcolor='$easy_color_body_scroll'n";
echo "var messages=new Array();n";

$z=0;
$result = mysql_db_query($db,"SELECT $tb_stories.sid, $tb_stories.title, $tb_stories.time, $tb_stories.hometext, $tb_topics.topicname FROM $tb_stories,$tb_topics where $tb_topics.topicid=$tb_stories.topic $supcri ORDER BY $tb_stories.sid DESC limit $ac2");
while(list($sid,$title,$time,$hometext,$topicname) = mysql_fetch_row($result))
{

$title= chop(ereg_replace("'", "'",$title));
$text=easy_clean($hometext,200);
$topicname= ucfirst(chop(ereg_replace("'", "'",$topicname)));
$date_news=easy_make_date($time);

echo "messages[".$z."]='<font FACE=Verdana size="1" color="".$easy_color_topic_scroll.""><b>".$topicname."</b> :</font><font FACE=Verdana size="1" color="".$easy_color_date_scroll."">".$date_news."</font><br><a href="".XOOPS_URL."/article.php?sid=".$sid."" target="_blank"><font face=vedana size=1><b>$text</b></font></a>';n";
$z++;
}
echo "messages[".$z."]='<center><a href=".XOOPS_URL."/modules.php?".$easymod."&amp;ac=add" target=_blank><img src="./modules/".$easy_name_rep."/".$easy_gif_scroll."" border=0></a></center>';n";

include("modules/".$easy_name_rep."/easynews2k.js");
easy_jscript("</td></tr></table>");

break;


case ticker:

if ($ac3!=0)
{
$supcri="and $tb_stories.topic=".$ac3;
}else{
if ($easy_topic_ticker == 0)
{
$supcri="";
}else{
$supcri="and $tb_stories.topic=".$easy_topic_ticker;
}
}

if ($ac2==0){$ac2=$easy_num_news_ticker;}

easy_jscript("<TABLE WIDTH=".$easy_widht_ticker." BORDER=0 CELLSPACING=0 cellpadding=0 >");
easy_jscript("<TR><TD><a href=".XOOPS_URL."/modules.php?".$easymod."&amp;ac=add" target=_blank><img src="./modules/".$easy_name_rep."/".$easy_gif_ticker."" border==0></a></TD>");
easy_jscript("<TD WIDTH=100%>");

$linkclass=XOOPS_URL."/modules/".$easy_name_rep."/";
$widhtclass=$easy_widht_ticker-52;
easy_jscript("<applet codebase=".$linkclass." code=easynews.class width=".$widhtclass." height=20>");
easy_jscript("<param name=bgcolor value="".$easy_color_body_ticker."">");


$z=0;
$result = mysql_db_query($db,"SELECT $tb_stories.sid, $tb_stories.title, $tb_stories.time, $tb_stories.hometext, $tb_topics.topicname FROM $tb_stories,$tb_topics where $tb_topics.topicid=$tb_stories.topic $supcri ORDER BY $tb_stories.sid DESC limit $ac2");
while(list($sid,$title,$time,$hometext,$topicname) = mysql_fetch_row($result))
{

$title= chop(ereg_replace("'", "'",$title));
$topicname= ucfirst(chop(ereg_replace("'", "'",$topicname)));
$date_news=easy_make_date($time);
$linkfinal=$date_news." ".$topicname." : ".$title." § ".XOOPS_URL."/article.php?sid=".$sid." § _load";
easy_jscript("<param name=N".$z." value="".$linkfinal."">");

$z++;
}


easy_jscript("</applet>");
easy_jscript("</td></tr></table>");


break;


case add:
default:
include("header.php");
OpenTable();
easy_modhtml();
CloseTable();

include(XOOPS_ROOT_PATH."/footer.php");
break;
break;
}
?>
Confused

 Nobse :

29.04.2004 19:32
 Mache mal die Datenbankabfragen so

$result= $db->query("select topic_id,topic_title from $tb_topics");

 butzemanya :

29.04.2004 19:48
 mh

Leider ist das nicht der einzigste fehler, ich glaube die verlinkung der befehle $easymod sind auch schroot,habe aber keine alternative gefunden um nicht gleich alles ändern zu müssen.

 Nobse :

29.04.2004 20:01
 Kann ich mir das mal irgendwo ansehen ?

 butzemanya :

29.04.2004 20:03
 ist schlecht weil ich das hier auf mein lokalen servr bearbeite.Kann dir aber mal mein rohling schicken.

 Nobse :

29.04.2004 20:06
 mach mal

 butzemanya :

29.04.2004 20:14
 habe es dir mit der pn geschickt Smile

 Nobse :

29.04.2004 20:43
 post PM

 butzemanya :

29.04.2004 20:59
 nicht zu fassen,eigentlich simple fehler aber ich bin gestern bestimmt 6std dran gesässen und habe schon ganz kleine augen bekommen.Jetzt kann ich weiter machen danke Very Happy

 butzemanya :

29.04.2004 22:10
 mh
habe noch was gefunden,
Code:
$linknewsbox = XOOPS_ROOT_PATH."/modules.php?".$easymod."&amp;ac=news&amp;ac2=&amp;ac3=";


$easymod sagt mir wo die easy_html.php liegt (glaube ich mal).Aber wie man unten sehen kann ist dord eine module.php von nuke integriert Sad .Xoops hat die ja nun zum glück nicht,aber welchen alternativ eintrag kann ich da machen.

achso den XOOPS_ROOT_PATH habe ich schon geändert in ROOT_URL weil sonst die komplette vrzeichniss tiefe angezeigt wird.

[ Geändert von butzemanya an 29.04.2004 22:16 ]
Partnerseiten
http://www.contaxe.com/?cref=1674143

Vote für eXV2
php
Kontakt/Info
  Kontakt
  Impressum
  Link zu uns
  AGB
  Datenschutzhinweis
Downloads
  eXV² Core
  Core Sprachfiles
eXV² Filecenter
  Downloads
  Download Module
  eXV² Themes
  Multilanguage Module
  Sprachfiles eXV² Module
eXV² Support
  France