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-05-2004 10:00 PM

vPreview
 
note: ive posted this here, can someone remove the post i made in the vb2 section, thanks.

This is my first hack so go easy on me :D, if ive missed anything then let me know!, i prolli have coz its like 2am

If you like it then please click install! :D

Release Date: 6th April 2004
Creator: Tomp, Zekie - Imaedia Ltd.
Support Provided : http://www.imaedia.com/forum/showthread.php?t=43

What it does

This hack enables a new bb code, [ preview ] this code followed by a url will display "preview here" on your post, when clicked this will take the user to a page with a header bar, with your forums logo on etc, and the url in the bottom frame

This could be usefull for:

Previewing Hacks
Previewing Templates
Prevewing websites in progress

Still to do

Need to sort out the back to forum link so it goes back to the post the user came from, working on this atm

7th April 2004 - Full list of vPreview 1.1 features can be found Here

if you want to see it working check out this thread : http://www.imaedia.com/forum/showthread.php?t=43

hope its some use lol

AN-net 04-06-2004 06:15 PM

great work!!!

would u happen to know how i could make this work with [url] also?

tomp 04-06-2004 06:25 PM

ill look into it for the next version :)

PET 04-06-2004 06:31 PM

Correct me if i'm wrong. This is like that stupid thing from MSN, if you open a link from them, they have that thing that tell's you that this link has been open from MSN ?

AN-net 04-06-2004 06:33 PM

i have figured it out:)

tomp 04-06-2004 06:34 PM

Yes its like the external link thing on hotmail, but the differance is this is for previewing hacks/templates/tutorials etc, in later versions there will be download features etc within the header, check the link in the first post to chek what features are planned

Ordovicium 04-07-2004 10:33 PM

Yeah, that's what I am looking for, but I will wait for the next version with the enhance go back button.

tomp 04-08-2004 10:31 AM

there alot more than just advanced back button in the next version :) check the features list link i posted on the first post

Ordovicium 04-08-2004 10:49 AM

Quote:

Originally Posted by tomp
there alot more than just advanced back button in the next version :) check the features list link i posted on the first post

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.

GamerJunk.net 04-08-2004 12:23 PM

Quote:

Originally Posted by Ordovicium
Yeah, that's what I am looking for, but I will wait for the next version with the enhance go back button.

How lazy are people to not just hit back on their browser?

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 01:37 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.01091 seconds
  • Memory Usage 1,762KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete