Author |
Message |
magiqhand
New Member


Joined: Mar 23, 2005
Posts: 17
|
Posted:
Wed Dec 21, 2005 1:58 pm |
|
How do I add the number of characters displayed in the title of an article in the news module. |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Wed Dec 21, 2005 3:55 pm |
|
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! |
|
|
 |
magiqhand

|
Posted:
Wed Dec 21, 2005 4:17 pm |
|
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

|
Posted:
Wed Dec 21, 2005 5:58 pm |
|
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

|
Posted:
Wed Dec 21, 2005 8:32 pm |
|
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

|
Posted:
Wed Dec 21, 2005 9:04 pm |
|
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

|
Posted:
Thu Dec 22, 2005 11:57 pm |
|
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&op=userinfo&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&op=userinfo&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

|
Posted:
Fri Dec 23, 2005 8:39 am |
|
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

|
Posted:
Fri Dec 23, 2005 4:01 pm |
|
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. |
|
|
|
 |
|