vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Last PM on Forumhome (https://vborg.vbsupport.ru/showthread.php?t=47900)

Slynderdale 05-13-2003 07:26 PM

Quote:

Today at 04:18 PM Boofo said this in Post #40
Welcome back, my friend. ;)
Thanks, latly I pretty much giving up on making hacks for vbulletin till 3.0 comes out. Ive been working on other projects in the mean time. Most for some freinds.

Current Projects (Not intergrated with vbulletin in any way):

Team managment page - user system with user profiles and a admin and user system that allow team admins to create accounts then users to log in and edit there profile.

List List - shows a list of links added by a team admin and also supports banners and tells the status of the site.

Image Gallery with auto thumbnailer

FAQ system that allows people to search FAQ's and team admins to add there own

Projects page - allows the admin to add, edit and delete current prjects and add a screen shot, link, description and other things.

Online dictionary - A custom dictionary where some one can add a word, pronouncian, translation, description and comments. Also with the dictionary withh be a search feature and a text translator feature.

and a bunch of others.

vB-Host.com 05-14-2003 06:01 AM

Awesome hack.. installed in less then 2 minutes on my www.thesportsforum.net board... thanks for such a cool hack!

Kriek 06-02-2003 09:37 PM

Confirmed working on 2.3.0, however I made a few slight modifcations in the manner that the private message previews are displayed. I noticed that you were utilizing nl2br() to convert new lines into <br> which can stretch the layout so I removed the call to that function and added a str_replace() to remove carriage returns "\n" and new lines "\n" from the $lastpmstuff['preview'] variable.

Boofo 06-02-2003 10:07 PM

Quote:

Today at 05:37 PM Kriek said this in Post #43
Confirmed working on 2.3.0, however I made a few slight modifcations in the manner that the private message previews are displayed. I noticed that you were utilizing nl2br() to convert new lines into <br> which can stretch the layout so I removed the call to that function and added a str_replace() to remove carriage returns "\n" and new lines "\n" from the $lastpmstuff['preview'] variable.
Can you show us what you changed in the code itself?

Kriek 06-03-2003 02:29 AM

Open index.php and find
PHP Code:

$lastpmstuff['preview'] = preg_replace("/\[[^\]]*\]/","",$lastpmstuff['message']); 

Add the following below it
PHP Code:

$lastpmstuff['preview'] = str_replace(array("\n","\r\n","\r")," ",$lastpmstuff['preview']); 

Remain in index.php and find
PHP Code:

$lastpmstuff['preview'] = trim(nl2br(dowordwrap($lastpmstuff['preview']))); 

Replace with the following
PHP Code:

$lastpmstuff['preview'] = trim(dowordwrap($lastpmstuff['preview'])); 


Boofo 06-03-2003 02:55 AM

Here's what I already had for that piece of code and I think it works about the same way, doesn't it?

PHP Code:

 $lastpmstuff['preview'] = preg_replace("/\[[^\]]*\]/","",$lastpmstuff['message']); 
 
$lastpmstuff['preview'] = str_replace("\"","",$lastpmstuff['preview']);
 
$lastpmstuff['preview'] = trim(htmlspecialchars($lastpmstuff['preview']));
 if (
strlen($lastpmstuff['preview']) > 300) {
   
$lastpmstuff['preview'] = substr($lastpmstuff['preview'], 0300) . "…";
  }
  
$lastpmstuff['preview'] = trim(dowordwrap($lastpmstuff['preview'])); // for pm title= preview 


Kriek 06-03-2003 03:35 AM

Technically yes, but it will not remove carriage returns and/or new lines.

Boofo 06-03-2003 03:47 AM

I tried it with your code and the message looked all run together. I want it to look like it does in the pm when you preview it.

Kriek 06-03-2003 09:41 PM

Then you completely misunderstood the purpose of my modifcations, as I do NOT want the preview to look like the original private message, because it stretches the layout; imagine a private message with ten or more carriage returns.

Boofo 06-03-2003 09:50 PM

I understand what you mean now. Sorry about that. It is just a little hard to read all bunched together for me. ;)

Kriek 06-03-2003 10:01 PM

No problem, my modifcations are easy enough for you to reverse I hope ;)


All times are GMT. The time now is 01:12 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
  • Page Generation 0.01191 seconds
  • Memory Usage 1,758KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete