![]() |
Although I love this script (GREAT JOB), one feature missing. I can't use my custom vb code within posts.
Example: I use and to center images in news posts. Of course, the code translates to HTML that does the centering work.Unfortunately, the news output does not center the images, and reveales the [center] codes. ANY FIXES? |
One more thing... it seems quotes don't work in titles. For example..
This type of title works perfectly This type of title "does not" work Is there any fix for this? |
Quote:
In newsconfig.php, find: preg_match("/(\[)(news)(])(\r\n)*([^\"]*)(\[\/news\])/siU", $news[$i][pagetext], $matches1); and replace it as: preg_match("/(\[)(news)(])(\r\n)*([^`]*)(\[\/news\])/siU", $news[$i][pagetext], $matches1); and find: $news[$i][pagetext]= preg_replace("/(\[)(news)(])(\r\n)*([^\"]*)(\[\/news\])/siU", "" ,$news[$i][pagetext]); and replace it as: $news[$i][pagetext]= preg_replace("/(\[)(news)(])(\r\n)*([^`]*)(\[\/news\])/siU", "" ,$news[$i][pagetext]); it should do the trick.. Quote:
Check the code: $news[$i][pagetext]= preg_replace("/(\[)(b)(])(.*)(\[\/b\])/siU", "<b>\\4</b>",$news[$i][pagetext]); You can use this sample to add extra vbcode. For example add this line after them: $news[$i][pagetext]= preg_replace("/(\[)(center)(])(.*)(\[\/center\])/siU", "<div align='center'>\\4</div>",$news[$i][pagetext]); Not tested but this should parse [center] tag correctly. Regards, Logician |
Quote:
What code would I add in order to parse list tags? I regularily use bulleted lists on my page, and would like to continue to do so. Is that possible? |
Quote:
Only this line should have been changed: return date ("M. jS, Y \a\\t g:i A", mktime($saat+$timeset, $dakika, $saniye, $ay, $gun, $yil)); A few lines above there is another line: $gelentarih=date("Y-d-m H:i:s",$gelentarih); it should left intact (You edited that one too) ;) Modify this line back to original and you should be fine.. @rkettner: You asked for the most difficult vbcode LOL. Give me sometime I'll see what I can do for you to have it parsed.. (no promise though) :) Regards, Logician |
Quote:
|
Hi!
Great hack! Only problem which I encountered is, that when I move my news over to the vBulletin database, the dates are lost on when they are added. Any suggestions? I could probably do it by hand, but that is a pain in the ass. :( Thanks, Till |
Quote:
There is also a hack around which helps admin to edit thread dates. This can save you from editing the dates with SQL. |
Quote:
Edit newsconfig.php, find: $news[$i][pagetext]= preg_replace("/(\[)(url)(])(\r\n)*([^\"]*)(\[\/url\])/siU", "<a href=\"\\5\" target=\"_blank\">\\5</a>",$news[$i][pagetext]); BEFORE that add: if (preg_match("/(\[)(list)(])(.*)(\[\/list\])/siU", $news[$i][pagetext],$matches1)) { $matches1[4]=preg_replace("/(\[\*\])(.*)/siU", "<li>\\2", $matches1[4]);echo $matches1[4]; $news[$i][pagetext]=preg_replace("/(\[)(list)(])(.*)(\[\/list\])/siU", $matches1[4], $news[$i][pagetext]); } This code will parse bulleted list tag. |
Quote:
yeah, I checked out the hack, however it's easier to do it by hand since - as you stated - there are not more than 10. But I am a little off with what field to modify, is it the "dateline" field? I can't really make out a field of type date or (unix)timestamp, other than the "editpost" one, which is too obvious. :) Thanks, Till |
All times are GMT. The time now is 11:23 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|