Din Menu
Fra fotoalbummet...

Nyeste artikler
> Billede ind i profil
> Optimer tabler i dat...
> Total Commander
> Redirect en side
> Mods / Infusion op p...
Downloads
SE ALLE DOWNLOADS...
Nye downloads
SurrealExperience 17
Luxury Yachts 10
Glare in Dark 66
AS-AppStore 36
AS-Global 20
AS-yellow_star 24
Hitman Games Zone 19
AS-Football 23
AS-Christmas 40
JuleCountdown til c... 20
Top 5 downloads
buzzlightyear 2802
php-fusion-7-01-02 2792
junglebook 2777
Disney2 2764
Disney1 2681
mickey-pluto. 2673
danish_locales_v7_1 2394
Opgraderingspakke v... 2367
Themes-phpfusion.dk
Facebook
Facebook

Pernille

statistik
Screenshots DB
Total Images: 796
Latest Images









statistik
Fra fotoalbummet...

Connect via Facebook
Connect via Facebook
Select your language
Danish Language Danish   English Language English
Fødselsdage i November
07.11 esig (61)
08.11 coldice (29)
14.11 Scorpion4Life (47)
15.11 DJ Tidzse (30)
17.11 ekate7 (49)
19.11 Kimse (64)
20.11 Brusher (49)
20.11 FogWelt (49)
24.11 SiteMaster (53)
26.11 kiko2611 (59)
26.11 kiko26 (59)
28.11 Micke Tyson (56)
Tilfældig Billede
Udtalelser fra brugerne
"SAssensvej...

Så køre det for dig

Har fået meget og god support her."

EvP
Reklame
Antispam
Se indlæg
Hvem er her? 1 gæst(er)
 Udskriv debat
frontpage.php
Zirconium
Hejsa !

Jeg ha hentet frontpage.php her fra siden, og har forsøgt at lægge koden ind til den nyhedsfunktion du også bruger her, men det ser ikke helt ud til at virke.
Download kildekode  Kode
<?php
/*---------------------------------------------------+
| PHP-Fusion 7 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of the
| GNU Affero GPL v3.
+----------------------------------------------------+
| Frontpage.php til phpfusion v7)
| af: kenneth Christensen ()
| Web: wwww.assensvej.dk
|
+----------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
require_once THEMES."templates/footer.php";

$num_of_news_items = 5;

$result = dbquery(
   "SELECT tn.*, tc.*, user_id, user_name, user_status FROM ".DB_PREFIX."news tn
   LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
   LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
   WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")
   ORDER BY news_sticky DESC, news_datestamp DESC LIMIT 0,".$num_of_news_items
);

$i = 0;

echo "<table align='center' cellpadding='0' cellspacing='5' width='100%'>\n";
while ($data = dbarray($result)) {
   $news_subject = stripslashes($data['news_subject']);
   $news_info = array(
      "news_id" => $data['news_id'],
      "user_id" => $data['user_id'],
      "user_name" => $data['user_name'],
      "user_status" => $data['user_status'],
      "news_date" => $data['news_datestamp'],
      "news_ext" => $data['news_extended'] ? "y" : "n",
      "news_reads" => $data['news_reads'],
      "news_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
      "news_allow_comments" => $data['news_allow_comments']
   );
   $news_cat_image = "";
   if ($data['news_cat_image']) {
      $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat_id']."'><img src='".IMAGES_NC.$data['news_cat_image']."' alt='".$data['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px' /></a>";
   } else {
      $news_cat_image = "";
   }
   $news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
   if ($news_cat_image != "") $news_news = $news_cat_image.$news_news;
   echo "<tr>\n<td valign='top' class='tbl1 border'><div style='text-align:center; font-weight:bold; color:#04678C;' class='tbl2 show_item'>".$news_subject."</div>\n";
   echo "<div ".($i != 0 ? "class='news_display'" : "")." style='width:100%;'>\n<br />".$news_news."<br /><br />
   <div style='text-align:center;' class='tbl2'>".newsposter($news_info," &middot;").newsopts($news_info,"&middot;").itemoptions("N",$news_info['news_id'])."</div>\n</div>\n</td>\n</tr>\n";
   $i++;
}
echo "<tr>\n<td valign='top' class='tbl1 border'><div style='text-align:center; font-weight:bold;' class='tbl2'><a href='".BASEDIR."news.php'>Alle nyheder</a></div>\n</td>\n</tr>\n</table>\n";

?>



 
Skrevet d. 23-11-2024 07:04
Reklame Agent

Antal indlæg: n^x
Tilmeldt: Altid

IP: localhost  
assensvej
Det er forde at den kode du har lagt ind skal ligge i et element og ikke i frontpage.php

koden du har set er der også en ande kode du skal have ind i din header.php

header.php
Download kildekode  Kode
echo "<script type='text/javascript'>
$(document).ready(function() {
   $('.news_display').css('display', 'none');
   $('.show_item').click(function () { $(this).next().slideToggle(\"normal\"); });
});
</script>\n</head>\n<body>\n";





og den kode du skal lægge i elemente (center panel)


element
Download kildekode  Kode
$num_of_news_items = 5;

$result = dbquery(
   "SELECT tn.*, tc.*, user_id, user_name, user_status FROM ".DB_PREFIX."news tn
   LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
   LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
   WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")
   ORDER BY news_sticky DESC, news_datestamp DESC LIMIT 0,".$num_of_news_items
);

$i = 0;

echo "<table align='center' cellpadding='0' cellspacing='5' width='100%'>\n";
while ($data = dbarray($result)) {
   $news_subject = stripslashes($data['news_subject']);
   $news_info = array(
      "news_id" => $data['news_id'],
      "user_id" => $data['user_id'],
      "user_name" => $data['user_name'],
      "user_status" => $data['user_status'],
      "news_date" => $data['news_datestamp'],
      "news_ext" => $data['news_extended'] ? "y" : "n",
      "news_reads" => $data['news_reads'],
      "news_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
      "news_allow_comments" => $data['news_allow_comments']
   );
   $news_cat_image = "";
   if ($data['news_cat_image']) {
      $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat_id']."'><img src='".IMAGES_NC.$data['news_cat_image']."' alt='".$data['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px' /></a>";
   } else {
      $news_cat_image = "";
   }
   $news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
   if ($news_cat_image != "") $news_news = $news_cat_image.$news_news;
   echo "<tr>\n<td valign='top' class='tbl1 border'><div style='text-align:center; font-weight:bold; color:#04678C;' class='tbl2 show_item'>".$news_subject."</div>\n";
   echo "<div ".($i != 0 ? "class='news_display'" : "")." style='width:100%;'>\n<br />".$news_news."<br /><br />
   <div style='text-align:center;' class='tbl2'>".newsposter($news_info," &middot;").newsopts($news_info,"&middot;").itemoptions("N",$news_info['news_id'])."</div>\n</div>\n</td>\n</tr>\n";
   $i++;
}
echo "<tr>\n<td valign='top' class='tbl1 border'><div style='text-align:center; font-weight:bold;' class='tbl2'><a href='".BASEDIR."news.php'>Alle nyheder</a></div>\n</td>\n</tr>\n</table>\n";





HUSK at læse reglerne for Brug af Debatten - Spørgsmål i privat beskeder og på msn, besvares ikke uden aftale.

Ekspert.
En ekspert er en, der har begået om ikke alle, så i hvert fald de groveste fejltagelser inden for sit felt

Niels Bohr, atomfysiker, 1865-1962
www.assensvej.dk/images/assensvej2Dbac.png
 
Zirconium
Det har jeg så prøvet lige nu, og får følgende fejl:

arse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /hsphere/local/home/zirconiu/xn--hjemlseshunde-fnb.dk/themes/templates/panels.php(78) : eval()'d code on line 5

Kan jeg ikke få den frontpage.php du har, hvor kun nyhedsdelen er med ? :-)
 
assensvej
jamen min frontpage.php

ser sådan her ud

Download kildekode  Kode
<?php
/*---------------------------------------------------+
| PHP-Fusion 7 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of the
| GNU Affero GPL v3.
+----------------------------------------------------+
| Frontpage.php til phpfusion v7)
| af: kenneth Christensen ()
| Web: wwww.assensvej.dk
|
+----------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
require_once THEMES."templates/footer.php";
?>




HUSK at læse reglerne for Brug af Debatten - Spørgsmål i privat beskeder og på msn, besvares ikke uden aftale.

Ekspert.
En ekspert er en, der har begået om ikke alle, så i hvert fald de groveste fejltagelser inden for sit felt

Niels Bohr, atomfysiker, 1865-1962
www.assensvej.dk/images/assensvej2Dbac.png
 
Spring til debat:
Lignende tråde
Debat Forum Svar Nyeste indlæg
Intro til "Frontpage.php Kravlegården på Assensvej 11 03-04-2010 15:17
frontpage. Generel debat - PHP-Fusion v7 13 22-02-2010 23:48