| Author |
Message |
NoFantasy
Newbie


Joined: Nov 01, 2006
Posts: 10
|
Posted:
Thu Dec 14, 2006 4:12 pm |
|
You have some cool stuff happening when a user hists the View Last Post-image in any forums list. The 50 first chars appearing as the title and make it appear as a unique title! I want it, lol
So far i got:
| Code: |
if(isset($p)) {
$p = intval($p);
$sql="SELECT post_text FROM ".$prefix."_bbposts_text WHERE post_id='$p' LIMIT 0,1";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$pname = substr($row['post_text'], 0, 55);
$pname = check_html($pname, "nohtml");
$pagetitle = "- $pname" ;
$pagetitle = check_html($pagetitle, "nohtml");
}
}
include("header.php");
?> |
...at the bottom of the ../modules/Forums/nukebb.php to achieve this.
Do you have any custom made function to strip out any not-wanted stuff in the title, like the [ quote : xxxxxxx-thingies? |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 388
|
Posted:
Thu Dec 14, 2006 9:34 pm |
|
I think this may be part of the Dynamic Titles mode |
| |
|
|
 |
NoFantasy
Newbie


Joined: Nov 01, 2006
Posts: 10
|
Posted:
Fri Dec 15, 2006 8:39 am |
|
Ah, yeah that might be it...i never did get that right for the forums, however the above code seems to work just fine with me.
I would like to get rid of any BBcode though...any ideas? |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1360
|
Posted:
Fri Dec 15, 2006 8:44 am |
|
Try something like this:
$pagetitle = preg_replace("/\[(\S+)\]/e", "", $pagetitle);
And do this right before your final "check_html" line. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
NoFantasy
Newbie


Joined: Nov 01, 2006
Posts: 10
|
Posted:
Fri Dec 15, 2006 1:09 pm |
|
Nice...works just great, thanks alot  |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1360
|
Posted:
Sat Dec 16, 2006 9:57 am |
|
You are welcome.
BTW, I took that directly out of the Dynamic Titles code. I need to release what I have incorporated into the upcoming RavenNuke 2.10 release so that others can get this as well. Maybe today... |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
NoFantasy
Newbie


Joined: Nov 01, 2006
Posts: 10
|
Posted:
Sun Dec 17, 2006 6:25 am |
|
Hm, i don't have that sort of code in my dynamic titles file. I'm guessing an old version. Didn't find an updated file here nor at raven's, so i try to sit still a few days, waiting for the goodies to come, lol |
| |
|
|
 |
|
|