- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 55 guest(s) and 0 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Pagebreak in News Module, how to 7.1 [ ]
Author
Message
OnlyNewZ
Nuke Cadet
Joined: Mar 03, 2004
Posts: 2
Posted:
Wed Mar 17, 2004 3:18 am
Hello,
I have tried several ways to include the <!--pagebreak--> code into the Function Themearticle. But it never worked. I only get the header. I think its something with the included html files. Perhaps anyone can help me.
Below the original code:
Code:
/************************************************************/
/* Function themearticle() */
/* */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home */
/************************************************************/
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
global $admin, $sid, $tipath, $page;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
$posted = ""._POSTEDON." $datetime "._BY." ";
$posted .= get_author($aid);
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if($informant != "") {
$content = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
}
$tmpl_file = "themes/NukeNews/story_page.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
And this should be added so far i know
Code:
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
global $admin, $sid, $tipath, $page;
$contentpages = explode( "<!--pagebreak-->", $thetext );
$pageno = count($contentpages);
if ( $page=="" || $page < 1 )
$page = 1;
if ( $page > $pageno )
$page = $pageno;
$arrayelement = (int)$page;
$arrayelement --;
if ($pageno > 1) {
$thetextNew .= "Page: $page/$pageno<br>";
}
$thetextNew .= "<p align="justify">$contentpages[$arrayelement]</p>";
if($page >= $pageno) {
$next_page = "";
} else {
$next_pagenumber = $page + 1;
if ($page != 1) {
$next_page .= "- ";
}
$next_page .= "<a href="article.html$sid&page=$next_pagenumber">"._NEXT." ($next_pagenumber/$pageno)</a> <a href="article.html$sid&page=$next_pagenumber"><img src="images/download/right.gif" border="0" alt=""._NEXT.""></a>";
}
if ($page == $pageno) {
$thetextNew .= "<br><p align="justify">".nl2br($mypage[page_footer])."</p><br><br>";
}
if($page <= 1) {
$previous_page = "";
} else {
$previous_pagenumber = $page - 1;
$previous_page = "<a href="article.html$sid&page=$previous_pagenumber"><img src="images/download/left.gif" border="0" alt=""._PREVIOUS.""></a> <a href="article.html$sid&page=$previous_pagenumber">"._PREVIOUS." ($previous_pagenumber/$pageno)</a>";
}
$thetextNew .= "<br><br><br><center>$previous_page $next_page</center><br><br>";
$thetext = $thetextNew;
Can you figure it out?
Wiitigo
Captain
Joined: Mar 08, 2004
Posts: 319
Location: USA
Posted:
Wed Mar 17, 2004 12:59 pm
Try a the pagebreak won't work.
Wiit
OnlyNewZ
Nuke Cadet
Joined: Mar 03, 2004
Posts: 2
Posted:
Wed Mar 17, 2004 1:53 pm
Nop it aint working!
To bad
Some one else a solution how to?
DrRienk
Nuke Cadet
Joined: May 31, 2004
Posts: 4
Posted:
Mon May 31, 2004 7:27 am
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum