Author |
Message |
LCJ_Eric
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Oct 26, 2005
Posts: 9
|
Posted:
Thu Nov 16, 2006 9:10 pm |
|
I am having a weird problem and can't seem to find where to fix it. Anytime a story is posted (through "submit news") it has two very annoying extra line breaks like this example:
Eric writes "
We will again be having our Rotary Lights Charity Ride...
(body deleted to save space)
See the post in the forum by clicking here for more details.
"
There is the " on the first line and then a line break. There is also a line break at the end of all articles and a quote orphaned at the bottom. What I want it to look like is this:
Eric writes
"We will again be having our Rotary Lights Charity Ride...
(body deleted to save space)
See the post in the forum by clicking here for more details."
OR....
I would even be fine with getting rid of those quote marks completely.
Does anyone have any ideas on this? I am stumped! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
evaders99
Former Moderator in Good Standing
![](modules/Forums/images/avatars/803d73f6452557b947721.jpg)
Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Thu Nov 16, 2006 11:24 pm |
|
What theme are you using? You'd probably check the themeindex function in theme.php |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
LCJ_Eric
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Nov 17, 2006 11:01 am |
|
I am using XPMidnight and fiapple211. Both exhibit the problem, but XPMidnight is the main theme used. There are two areas I believe that may hold the solution, but I am not sure which one holds the answer.
Here is the FormatStory section from theme.php for XPMidnight
Code:function FormatStory($thetext, $notes, $aid, $informant) {
global $anonymous;
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> $notes>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
echo "<font class=\"content\">$thetext$notes</font>\n";
} else {
if($informant != "") {
$boxstuff = "<i><a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a></i> ";
} else {
$boxstuff = "$anonymous ";
}
$boxstuff .= "".translate("<i>writes</i>")." \"$thetext\"$notes\n"; echo "<font class=\"content\" color=\"#505050\">$boxstuff</font>\n";
}
}
[/list]
Here is the functionThemeIndex section from theme.php for XPMidnight
[list]function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $datetime, $tipath;
echo "<br><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" width=\"100%\">\n"
."<tr>\n"
."<td>\n"
."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
."<tr>\n"
."<td align=\"left\" valign=\"top\" width=\"26\" height=\"30\"><img src=\"themes/XPMidnight/images/sidebox-title-left.gif\"></td>\n"
."<td align=\"left\" valign=\"middle\" background=\"themes/XPMidnight/images/sidebox-title-bg.gif\" width=\"100%\" height=\"30\">\n"
."<font class=\"storytitle\" color=\"#363636\"> <b>$title</b></font>\n"
."</td>\n"
."<td align=\"left\" valign=\"top\" width=\"6\" height=\"30\"><img src=\"themes/XPMidnight/images/sidebox-title-right.gif\"></td>\n"
."</tr>\n"
."</table>\n"
."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
."<tr>\n"
."<td>\n"
."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
."<tr>\n"
."<td align=\"left\" valign=\"top\" width=\"15\" height=\"42\"><img src=\"themes/XPMidnight/images/storybox-left.gif\"></td>\n"
."<td align=\"left\" valign=\"middle\" background=\"themes/XPMidnight/images/storybox-bg.gif\" width=\"100%\" height=\"42\">\n"
."<font color=\"#747474\" size=\"1\">"._POSTEDBY." ";
formatAidHeader($aid);
echo " "._ON." $time $timezone ($counter "._READS.")</font>\n"
."<font color=\"#747474\">$morelink</font>\n"
."</td>\n"
."<td width=\"12\" align=\"left\" valign=\"top\"><img src=\"themes/XPMidnight/images/storybox-right.gif\"></td>\n"
."</tr>\n"
."</table>\n"
."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
."<tr>\n"
."<td width=\"4\" align=\"left\" valign=\"top\" background=\"themes/XPMidnight/images/sidebox-bar-left.gif\"><img src=\"themes/XPMidnight/images/sidebox-bar-px.gif\"></td>\n"
."<td>\n"
."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">\n"
."<tr valign=\"top\">\n"
."<td>\n"
."<font color=\"#747474\"><b><a href=\"search.php?query=&topic=$topic\"><img src=\"$tipath$topicimage\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a></B></font>\n";
FormatStory($thetext, $notes, $aid, $informant);
echo "</td></tr></table>\n"
."</td>\n"
."<td width=\"13\" align=\"left\" valign=\"top\" background=\"themes/XPMidnight/images/storybox-content-right.gif\"><img src=\"themes/XPMidnight/images/storybox-content-right-px.gif\"></td>\n"
."</tr></table>\n"
."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
."<tr valign=\"top\">\n"
."<td width=\"9\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/XPMidnight/images/storybox-bottom-left.gif\"></td>\n"
."<td width=\"100%\" height=\"29\" background=\"themes/XPMidnight/images/storybox-bottom-bg.gif\"> </td>\n"
."<td width=\"18\" height=\"29\" align=\"left\" valign=\"top\"><img src=\"themes/XPMidnight/images/storybox-bottom-right.gif\"></td>\n"
."</table>\n"
."</td></tr></table>\n"
."</td></tr></table>\n";
}
|
I made some changes in the first one to get rid of the italic formatting of the stories. I assumed (most likely mistakenly) that this is where my line break problem was too, bu I didn't see it in there. I am a total PHP n00b so that prolly doesn't help.
Thanks to everyone in advance for their thoughts. |
Last edited by LCJ_Eric on Thu Jun 28, 2007 12:48 pm; edited 2 times in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
LCJ_Eric
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 28, 2007 10:06 am |
|
I never did get this figure out. Anyone have any ideas on this? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
floppydrivez
Involved
![Involved Involved](modules/Forums/images/ranks/4stars.gif)
![](modules/Forums/images/avatars/d861f25a45009755975f0.gif)
Joined: Feb 26, 2006
Posts: 340
Location: Jackson, Mississippi
|
Posted:
Thu Jun 28, 2007 10:56 am |
|
First off I would like to say if you would use the code tags provided with phpbb it would make your post a lot easier to follow.
Open theme.php of your current theme. Find function themearticle
The below is an example not exactly sure what yours will look like.
Code: if($informant != "") {
$content = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." \"$thetext\"$notes\n";
}
|
The only line needed out of that whole bit to pull this hack off is
Code:$content .= " \"$thetext\"$notes\n";
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
LCJ_Eric
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 28, 2007 12:08 pm |
|
Sorry about not using the code tags. Liek I said - I am not saavy at php.
I found themearticle, but the code you refereced is not located there in my theme. It is in themeindex where evaders first pointed me.
Code:
function FormatStory($thetext, $notes, $aid, $informant) {
global $anonymous;
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> $notes>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
echo "<font class=\"content\">$thetext$notes</font>\n";
} else {
if($informant != "") {
$boxstuff = "<i><a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a></i> ";
} else {
$boxstuff = "$anonymous ";
}
$boxstuff .= "".translate("<i>writes</i>")." \"$thetext\"$notes\n"; echo "<font class=\"content\" color=\"#505050\">$boxstuff</font>\n";
}
}
|
Let me add that this occurs anytime a story is posted by a user OTHER THAN me. If I post a story, it doesn't happen.
I know I could just take out the "<username> writes" but I want the contributors to get proper credit.
If you take a look at the site (www.lcjs.org) you can see what I mean |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
floppydrivez
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 28, 2007 12:29 pm |
|
Try something like this
Code:$boxstuff .= "".translate("<i>writes</i>")."<br />\"$thetext\"$notes\n"; echo "<font class=\"content\" color=\"#505050\">$boxstuff</font>\n";
}
}
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
floppydrivez
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 28, 2007 12:34 pm |
|
Notice all I did was add <br /> before the first slash close to the $thetext |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
LCJ_Eric
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 28, 2007 12:54 pm |
|
I tried as you suggested, here are the results:
Before The Change
DUNKS writes "
LCJ Highway Clean-up
There has been an impromptu Highway.....
After The Change
DUNKS writes
"
LCJ Highway Clean-up
There has been an impromptu Highway.....
What I would really like it to be is:
DUNKS writes
"LCJ Highway Clean-up
There has been an impromptu Highway.....
OR
DUNKS writes...
LCJ Highway Clean-up
There has been an impromptu Highway.....
or something similar.
I really just want the quote mark, if there must be one, to be on the same line the actual story begins on.
I really do appreciate your help! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
floppydrivez
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 28, 2007 1:27 pm |
|
Looks like where ever $thetext is formed there is a break.
I may have to try it on my local to get the desired result. I am just guessing atm. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
floppydrivez
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 28, 2007 1:34 pm |
|
Try it like this
Code:<br />$thetext\"$notes\n
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
LCJ_Eric
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 28, 2007 3:38 pm |
|
Excellent - I believe I have success. Here is what I ended up up for code:
Code:$boxstuff .= "".translate("<i>writes</i>")."...<br />$thetext $notes"; echo "<font class=\"content\" color=\"#505050\">$boxstuff</font>\n";
|
Everything looks like how I ultimately wanted it.
The quote marks are gone completely and I have an elipses (spelling?) after "writes"
I had to make one extra change to get it to be how it is now. The code was
Code:<br />$thetext\$notes\n";
|
It now is
Code:<br />$thetext $notes";
|
If that seems legit, I am going to call it good as it look great from a visualk standpoint. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|