Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
magiqhand
New Member
New Member


Joined: Mar 23, 2005
Posts: 17

PostPosted: Wed Dec 21, 2005 1:58 pm Reply with quote

How do I add the number of characters displayed in the title of an article in the news module.
 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9453
Location: Arizona

PostPosted: Wed Dec 21, 2005 3:55 pm Reply with quote

magiqhand, sorry, but need clarification please. Are you asking to display within the news article Title the number of characters that are present in the article text itself? If so, there are two article text fields, the short text and then the extended text. Are you interested in the sum of those two?

Thanks

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
magiqhand
PostPosted: Wed Dec 21, 2005 4:17 pm Reply with quote

No I am talking about the title you give to article, it is limitted to about two lines, how can I make longer. Take as an example on raven's home page the first article's title is "Free paypal subscription module 1.0 released!" On my site when you type more than two lines only the first line appear. For instance you type:

magiqhand, sorry, but need clarification please. Are you asking to display within the news article Title the number of characters that are present in the article text

only this part will appear

magiqhand, sorry, but need clarification please. Are you asking to display within
 
montego
PostPosted: Wed Dec 21, 2005 5:58 pm Reply with quote

magiqhand, this is theme related and must be changed for each theme you wish this to work on. Find your appropriate theme.php script and look for the function called function themearticle and possibly change the code there.
 
magiqhand
PostPosted: Wed Dec 21, 2005 8:32 pm Reply with quote

Ok thanks it will be great if you can be more specific and tell me which line of code to modify and so on.
 
montego
PostPosted: Wed Dec 21, 2005 9:04 pm Reply with quote

magiqhand, every theme is different, therefore, cannot tell you where exactly. If you post the code for this function for your theme, maybe we can find the right spot.
 
magiqhand
PostPosted: Thu Dec 22, 2005 11:57 pm Reply with quote

montego, I believe that is what you need.

*/
/* This function format the stories on the Homepage */
/************************************************************/

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
if (!empty($notes)) {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if(!empty($informant)) {
$content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
}
$posted = ""._POSTEDBY." ";
$posted .= get_author($aid);
$posted .= " "._ON." $time $timezone ($counter "._READS.")";
$tmpl_file = "themes/Niger/story_home.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}

/************************************************************/
/* Function themeindex() */
/* */
/* 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;
$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 (!empty($notes)) {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if(!empty($informant)) {
$content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
}
$tmpl_file = "themes/Niger/story_page.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
 
montego
PostPosted: Fri Dec 23, 2005 8:39 am Reply with quote

Ok, this definitely helped. Looks like the HTML is being controlled in themes/Niger/story_page.html. Are you HTML savvy enough to find it and change it? If not, send this file to me at:

montego _{ at }_ montegoscripts ___ dot }}} com.
 
montego
PostPosted: Fri Dec 23, 2005 4:01 pm Reply with quote

Ok. I took a look at the story_page.html file you sent. It should be showing the full title AND wrapping it. The title/subject of the article can only be 80 characters, but you should see the full 80 characters unless something in your theme.php code is truncating it. Can you please ZIP or RAR up your entire theme directory and resend it to me?

Could you also post a sample news article on your web site (provide me the address in the email) showing the issue? I want to compare the output to the theme code.

I can find nothing within mainfile.php or in the submit news script files that would be chopping the title text off. You should be able to see at least 80 characters worth.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©