vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vPreview (https://vborg.vbsupport.ru/showthread.php?t=63545)

tomp 04-08-2004 02:32 PM

Quote:

Originally Posted by Ordovicium
I have 2 suggestions:
It would be also cool, when you can insert an optional text. Maybe in the center.
Like: This is a redirect site and not part of the community

And the other one.
A link to remove the banner.

good ideas, id appriciate it if you could post them over on my forum, its just easyer to keep track of all the suggestions if there in one place

gmarik 04-08-2004 05:38 PM

demo site is not loading for me...

tomp 04-08-2004 10:14 PM

sorry our host kinda sucks atm :)...should be ok now though

teksigns 04-11-2004 02:56 PM

anyone have any idea how to make
mt site always use the preview code
when someone enters a link .......

that way i dont need to have them use the [preview]
stuff.

i want it to always embed that auto unless its a system
administrator . then i want it to work like normal .

teksigns 04-11-2004 03:36 PM

Quote:

Originally Posted by teksigns
anyone have any idea how to make
mt site always use the preview code
when someone enters a link .......


that way i dont need to have them use the [preview]
stuff.


i want it to always embed that auto unless its a system
administrator . then i want it to work like normal .


ok i have this working by changing the code in :

functions_newpost.php


PHP Code:

// ###################### Start parseurl #######################
function convert_url_to_bbcode($messagetext)
// the auto parser - adds [url] tags around neccessary things

    
global $urlSearchArray$urlReplaceArray$emailSearchArray$emailReplaceArray;

    if (!isset(
$urlSearchArray))
    {
        
$urlSearchArray = array(
            
"#(^|(?<=[^_a-z0-9-=\]\"'/]))((https?|ftp|gopher|news|telnet)://|www\.)((\[(?!/)|[^\s[()^$!`\"'|{}<>])+)(?!\[/url|\[/img)(?=[,.]*([\s)[]|$))#siU"
        
);

        if(
$permissions['adminpermissions']){
        
$urlReplaceArray = array(
            
"[url]\\2\\4[/url]"
        
);
        }else{
        
$urlReplaceArray = array(
            
"[preview]\\2\\4[/preview]"
        
);
        }

        
$emailSearchArray = array(
            
"/([ \n\r\t])([_a-z0-9-]+(\.[_a-z0-9-]+)*@[^\s]+(\.[a-z0-9-]+)*(\.[a-z]{2,4}))/si",
            
"/^([_a-z0-9-]+(\.[_a-z0-9-]+)*@[^\s]+(\.[a-z0-9-]+)*(\.[a-z]{2,4}))/si"
        
);

        
$emailReplaceArray = array(
            
"\\1[email]\\2[/email]",
            
"[email]\\0[/email]"
        
);
    }

    
$text preg_replace($urlSearchArray$urlReplaceArray$messagetext);
    if (
strpos($text"@"))
    {
        
$text preg_replace($emailSearchArray$emailReplaceArray$text);
    }

    return 
$text;




i have one problem though ......


if a use post a link to something on my site i dont want it to use the preview code .

are there a way to change the if statement above to exclude urls that conatin my site string ?

Eternal2u 04-25-2004 06:37 AM

the preview links are ++++ed just so you know..

Lurk 06-30-2004 10:55 PM

this is a nice hack
if you want a screenshot, just ask and i'll post one :) unless someone else can

red_baron2000 12-24-2004 02:41 AM

Quote:

Originally Posted by Lurk
this is a nice hack
if you want a screenshot, just ask and i'll post one :) unless someone else can

yes please :)


All times are GMT. The time now is 08:14 PM.

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.01160 seconds
  • Memory Usage 1,742KB
  • 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
  • (1)bbcode_php_printable
  • (3)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
  • (8)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