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)
-   -   LinkMe Hack (https://vborg.vbsupport.ru/showthread.php?t=64615)

Pseudomizer 04-30-2004 10:00 PM

LinkMe Hack
 
OR
How-To-Link-us in a nutshell

I have created a PHP file and one template which creates a new page in the look and feel of your domain. This file searches the directory ./images/banners/ and creates for each file which is found there an image and the appropriate source code in html. This source code can be copied via double click into the clipboard. :o

The aim of this mini-hack would be, to make it easier for your members to link your homepage/domain. In addition it will make your life easier because every graphic that you copy into /images/banners will automatically be translated into your LinkMe page. Once installed you just add more banners and graphics and you do not have to care any more about any HTML code. :devious:

Installation instructions are in the zip file. Install time estimated: 2 mins

I will only give support if you click on the install button on the right upper corner or you click on this INSTALL link.

If you want to see it live in action please visit:

Example

But it is in german. :nervous:

Update:
Changes for functions_online.php implemented into the ZIP file and posted below.

Cheers,

Boofo 05-01-2004 07:06 PM

There! I clicked install, now where's my support?! ;)

Pseudomizer 05-01-2004 07:17 PM

Quote:

Originally Posted by Boofo
There! I clicked install, now where's my support?! ;)

Tell me your problem please. :nervous:

Cheers,

Skyline_GT 05-01-2004 09:43 PM

Good Job:D
I like this:D

FleaBag 05-02-2004 12:03 AM

Cool. :)

Boofo 05-02-2004 02:56 AM

Quote:

Originally Posted by Pseudomizer
Tell me your problem please. :nervous:

Cheers,

No problems. I just thought I'd ask since you said you would only provide support if we clicked the install button. Sorry if I made you nervous. ;)

GamerJunk.net 05-02-2004 05:17 AM

Cool hack!

I-Web 05-02-2004 08:09 AM

Nice one

Pseudomizer 05-02-2004 10:30 AM

Quote:

Originally Posted by Boofo
No problems. I just thought I'd ask since you said you would only provide support if we clicked the install button. Sorry if I made you nervous. ;)

I know that buddy. :laugh:

Cheers,

aloha 05-02-2004 08:12 PM

Boofo, your a silly little critter lol

Thanks for the hack

keep coding :P

Pseudomizer 05-04-2004 10:49 AM

Hi @LL,

i forgot to change the function_online.php for the correct view on the online.php.

Please do the following:

IN: includes/functions_online.php

Find:
PHP Code:

default:
            if (
$permissions['wolpermissions'] & CANWHOSONLINEBAD

Above add:
PHP Code:

        case 'LinkMe':
            
$userinfo['action'] = 'LinkMe';
            
$userinfo['where'] = "<a href=\"LinkMe.php\">$vboptions[bbtitle] LinkMe</a>";
            break; 

Then find in the same file:
PHP Code:

    default:
        
$userinfo['activity'] = 'unknown';
    } 

Above add:
PHP Code:

    case 'LinkMe.php':
        
$userinfo['activity'] = 'LinkMe';
        break; 

Cheers,

PixelFx 05-04-2004 07:42 PM

is the above change updated in the zip? cool system by the way :)

Pseudomizer 05-04-2004 07:55 PM

Quote:

Originally Posted by PixelFx
is the above change updated in the zip? cool system by the way :)

Yes. I updated it before i sent out the update to all installers.

Cheers,

SmartGnome 05-06-2004 08:32 AM

@Pseudomizer

Great hack, thanks. This was exactly what we were looking for :banana:

Install is clicked and install was piece a cake

CharlieBrownDE 05-06-2004 08:41 AM

Quote:

Originally Posted by SmartGnome
@Pseudomizer

Great hack, thanks. This was exactly what we were looking for :banana:

Install is clicked and install was piece a cake

hello Pseudomizer,

can you publish this expansion at vbulletin-Germany, too or does it adapt to the forum language? is only no asks ( ist ja nur ne frage:) )

Pseudomizer 05-06-2004 09:12 AM

Quote:

Originally Posted by CharlieBrownDE
hello Pseudomizer,

can you publish this expansion at vbulletin-Germany, too or does it adapt to the forum language? is only no asks ( ist ja nur ne frage:) )

Hi Charlie,

i know that problem with vbulletin germany and com. I am not a member of the germany one and the license transfer something i do not like personally.

Aber schau Dir mal bitte mein erstes Posting in diesem Thread GENAU an und Du wirst f?ndig. :devious:

Cheers,

CharlieBrownDE 05-06-2004 09:27 AM

Quote:

Originally Posted by CharlieBrownDE
hello Pseudomizer,

can you publish this expansion at vbulletin-Germany, too or does it adapt to the forum language? is only no asks ( ist ja nur ne frage:) )

thx. blind:D

Christine 05-07-2004 11:38 PM

Oh this is pretty!

*installs*

kall 05-08-2004 09:55 AM

Oh wow, very nice.

*clicks Install*

Kwak 05-09-2004 06:03 AM

Just what I needed! Thanks mate. Clicked Install.

edit: On the source code (inside the textbox), how can we change the HTML format?

Code:

        <!-- http://www.calpolyonline.com/forums Advertising Start -->

        <A HREF="http://www.calpolyonline.com/forums">
<IMG SRC="http://www.calpolyonline.com/forums/images/banners/calpolyonlinemain.gif"></A>

        <!-- http://www.calpolyonline.com/forums Advertising End -->


I want to change the above code to:

Code:

        <a href="http://www.calpolyonline.com/forums/">
<img src="http://www.calpolyonline.com/forums/images/banners/calpolyonlinemain.gif" alt="ALT"></a>


Notice the change? I have removed the <!-- --> brackets, removed capitalization, added a backward slash on the URL and added a "ALT" code. How would you be able to do that? Thank you for the support. Just the hack I was waiting for. :up:

StarBuG 05-09-2004 05:37 PM

Thx for this nice hack.

I have a question wich is not directly regarding your hack but maybe someone can help me anyway.

I have a hack wich shows "unknown location" in user online and I tried to edit functions_online.php

The second option is clear but how is the the first "case" determant?

case 'LinkMe': (the LinkMe)

It cant be define('THIS_SCRIPT','....'); cause you have "chat" entered in the LinkMe.php (should be fixed ;))

I realy can?t figure that out.

Can anyone help?

StarBuG

Pseudomizer 05-09-2004 06:10 PM

Quote:

Originally Posted by iKwak
Just what I needed! Thanks mate. Clicked Install.

edit: On the source code (inside the textbox), how can we change the HTML format?

Code:

        <!-- http://www.calpolyonline.com/forums Advertising Start -->

        <A HREF="http://www.calpolyonline.com/forums">
<IMG SRC="http://www.calpolyonline.com/forums/images/banners/calpolyonlinemain.gif"></A>

        <!-- http://www.calpolyonline.com/forums Advertising End -->


I want to change the above code to:

Code:

        <a href="http://www.calpolyonline.com/forums/">
<img src="http://www.calpolyonline.com/forums/images/banners/calpolyonlinemain.gif" alt="ALT"></a>


Notice the change? I have removed the <!-- --> brackets, removed capitalization, added a backward slash on the URL and added a "ALT" code. How would you be able to do that? Thank you for the support. Just the hack I was waiting for. :up:

Hi iKwak,

you talk about this section in the php file:

PHP Code:

        <code style=\"white-space:nowrap\">
        &lt;!-- 
$vboptions[bburl] Advertising Start --&gt;<BR>
        &lt;A HREF=\"
$vboptions[bburl]\"&gt;<BR>&lt;IMG SRC=\"$vboptions[bburl]/images/banners/".$file."\"&gt;&lt;/A&gt;<BR>
        &lt;!-- 
$vboptions[bburl] Advertising End --&gt;
        </code></pre> 

Change it for your particular request to:

PHP Code:

        <code style=\"white-space:nowrap\">
                &lt;A HREF=\"
$vboptions[bburl]/\"&gt;<BR>&lt;IMG SRC=\"$vboptions[bburl]/images/banners/".$file."\" alt=\"ALT\"&gt;&lt;/A&gt;<BR>
        </code></pre> 

Cheers,

Pseudomizer 05-09-2004 06:16 PM

Quote:

Originally Posted by StarBuG
Thx for this nice hack.

I have a question wich is not directly regarding your hack but maybe someone can help me anyway.

I have a hack wich shows "unknown location" in user online and I tried to edit functions_online.php

The second option is clear but how is the the first "case" determant?

case 'LinkMe': (the LinkMe)

It cant be define('THIS_SCRIPT','....'); cause you have "chat" entered in the LinkMe.php (should be fixed ;))

I realy can?t figure that out.

Can anyone help?

StarBuG

Thanks StarBug for pointing this out. But regardless of this it should work with the appropriate changes.

But ok. With the next update i will change the header in the PHP file from:

PHP Code:

   define('THIS_SCRIPT','chat'); 

to

PHP Code:

   define('THIS_SCRIPT','LinkMe'); 

And for your first request:

It is very easy to define unknown locations. You have to create 2 entries. One entry like this:

PHP Code:


        
case 'LinkMe':
            
$userinfo['action'] = 'LinkMe';
            
$userinfo['where'] = "<a href=\"LinkMe.php\">$vboptions[bbtitle] LinkMe</a>";
            break; 

and then a second entry like this:

PHP Code:



    
case 'LinkMe.php':
        
$userinfo['activity'] = 'LinkMe';
        break; 

And if you would like to know where to place these please look into my install.html from this hack. This should help.

Cheers,

StarBuG 05-09-2004 06:22 PM

Quote:

Originally Posted by Pseudomizer
Thanks StarBug for pointing this out. But regardless of this it should work with the appropriate changes.

But ok. With the next update i will change the header in the PHP file from:

PHP Code:

   define('THIS_SCRIPT','chat'); 

to

PHP Code:

   define('THIS_SCRIPT','LinkMe'); 

And for your first request:

It is very easy to define unknown locations. You have to create 2 entries. One entry like this:

PHP Code:


        
case 'LinkMe':
            
$userinfo['action'] = 'LinkMe';
            
$userinfo['where'] = "<a href=\"LinkMe.php\">$vboptions[bbtitle] LinkMe</a>";
            break; 

and then a second entry like this:

PHP Code:



    
case 'LinkMe.php':
        
$userinfo['activity'] = 'LinkMe';
        break; 

And if you would like to know where to place these please look into my install.html from this hack. This should help.

Cheers,

You missunderstood me.

I know where I should place this but I need to know where:

case 'LinkMe':

the 'LinkMe' is taken from.

Hope you know what I mean

Ah and one more thing to fixe:

In LinkMe.php

find:
PHP Code:

eval('$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('LinkMe') . '");'); 

above it add:
PHP Code:

$navbits = array('' => "LinkMe");
$navbits construct_navbits($navbits); 

;)


StarBuG

Pseudomizer 05-09-2004 06:59 PM

Quote:

Originally Posted by StarBuG
You missunderstood me.

I know where I should place this but I need to know where:

case 'LinkMe':

the 'LinkMe' is taken from.

Hope you know what I mean

Ah and one more thing to fixe:

In LinkMe.php

find:
PHP Code:

eval('$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('LinkMe') . '");'); 

above it add:
PHP Code:

$navbits = array('' => "LinkMe");
$navbits construct_navbits($navbits); 

;)


StarBuG


Hi,

the location is the key. In this line you define what should happen:

PHP Code:

$userinfo['where'] = "<a href=\"YOUR.php\ 

If the user is on this php file you define the action.

And thanks for the hint ( it is not a fix ) but it works as it is. Or it doesn't ?

Cheers,

StarBuG 05-09-2004 07:15 PM

I have tried that

the file is called: vb_jukebox.php

i have in functions_online.php

case 'Jukebox':
$userinfo['action'] = 'vB Jukebox';
$userinfo['where'] = "<a href=\"vb_jukebox.php\">$vboptions[bbtitle] vB Jukebox</a>";
break;

case 'vb_jukebox.php':
$userinfo['activity'] = 'vB Jukebox';
break;


But it still shows unknown location
(I added it below your LinkMe code)

Any idea?

And without my "fix" you don?t have a location in the navbar ;)

Greetings

StarBuG

Pseudomizer 05-09-2004 07:20 PM

Quote:

Originally Posted by StarBuG
I have tried that

the file is called: vb_jukebox.php

i have in functions_online.php

case 'Jukebox':
$userinfo['action'] = 'vB Jukebox';
$userinfo['where'] = "<a href=\"vb_jukebox.php\">$vboptions[bbtitle] vB Jukebox</a>";
break;

case 'vb_jukebox.php':
$userinfo['activity'] = 'vB Jukebox';
break;


But it still shows unknown location
(I added it below your LinkMe code)

Any idea?

And without my "fix" you don?t have a location in the navbar ;)

Greetings

StarBuG

Your code is correct. So you either have a comma wrong or you placed it into the wrong section.

And thanks for the navbar hint. I will build this into the next version.

Cheers,

StarBuG 05-09-2004 07:23 PM

Quote:

Originally Posted by Pseudomizer
Your code is correct. So you either have a comma wrong or you placed it into the wrong section.

And thanks for the navbar hint. I will build this into the next version.

Cheers,

I put it exactly below your code infact I copied your code and just replaced the needed parts.

here:

case 'LinkMe':
$userinfo['action'] = 'LinkMe';
$userinfo['where'] = "<a href=\"LinkMe.php\">$vboptions[bbtitle] LinkMe</a>";
break;
case 'Jukebox':
$userinfo['action'] = 'vB Jukebox';
$userinfo['where'] = "<a href=\"vb_jukebox.php\">$vboptions[bbtitle] vB Jukebox</a>";
break;
default:
if ($permissions['wolpermissions'] & CANWHOSONLINEBAD)


AND:

case 'LinkMe.php':
$userinfo['activity'] = 'LinkMe';
break;
case 'vb_jukebox.php':
$userinfo['activity'] = 'vB Jukebox';
break;
default:
$userinfo['activity'] = 'unknown';
}

Can it be that there is something that needs to be in the file vb_jukebox.php too to work?

Star

Pseudomizer 05-09-2004 07:29 PM

Quote:

Originally Posted by StarBuG
I put it exactly below your code infact I copied your code and just replaced the needed parts.

here:

case 'LinkMe':
$userinfo['action'] = 'LinkMe';
$userinfo['where'] = "<a href=\"LinkMe.php\">$vboptions[bbtitle] LinkMe</a>";
break;
case 'Jukebox':
$userinfo['action'] = 'vB Jukebox';
$userinfo['where'] = "<a href=\"vb_jukebox.php\">$vboptions[bbtitle] vB Jukebox</a>";
break;
default:
if ($permissions['wolpermissions'] & CANWHOSONLINEBAD)


AND:

case 'LinkMe.php':
$userinfo['activity'] = 'LinkMe';
break;
case 'vb_jukebox.php':
$userinfo['activity'] = 'vB Jukebox';
break;
default:
$userinfo['activity'] = 'unknown';
}

Can it be that there is something that needs to be in the file vb_jukebox.php too to work?

Star

It can't be THIS_SCRIPT because i had this wrong and it worked for me. :surprised:

So it is either the globaltemplate or the include of the global.php. I did nothing else.

Cheers,

StarBuG 05-09-2004 07:39 PM

YES

I solved it!!! hehe

The second entry

$userinfo['activity'] = 'Jukebox';

determens the location-
The first entry handles the display in the useronline view
where

case 'Jukebox':

is definded by "activity" ;)

Just in case anyone wants to know

Thx for the quick help and for this nice hack

If you want to have some suggestions to improve your hack:

It would be good to be able to define folders outside of the forum cause I store my banners outside the forum and like it is now I have to update both folders when I add banners

Greetings

StarBuG

Pseudomizer 05-09-2004 07:48 PM

Quote:

Originally Posted by StarBuG
YES

I solved it!!! hehe

The second entry

$userinfo['activity'] = 'Jukebox';

determens the location-
The first entry handles the display in the useronline view
where

case 'Jukebox':

is definded by "activity" ;)

Just in case anyone wants to know

Thx for the quick help and for this nice hack

If you want to have some suggestions to improve your hack:

It would be good to be able to define folders outside of the forum cause I store my banners outside the forum and like it is now I have to update both folders when I add banners

Greetings

StarBuG

Glad you found it.

And for the directory:

You change it to whatever diretory you want in ( total path if you wish):
PHP Code:

    $direktory "./images/banners"

And you can also change the URL to the pictures in(also other URLs):
PHP Code:

<IMG SRC=\"$vboptions[bburl]/images/banners/".$file

But 95% of the people have their banners in the same domain and in the same webroot. You can change it. It will work.

Cheers,

StarBuG 05-09-2004 07:52 PM

Quote:

Originally Posted by Pseudomizer
Glad you found it.

And for the directory:

You change it to whatever diretory you want in ( total path if you wish):
PHP Code:

    $direktory "./images/banners"

And you can also change the URL to the pictures in(also other URLs):
PHP Code:

<IMG SRC=\"$vboptions[bburl]/images/banners/".$file

But 95% of the people have their banners in the same domain and in the same webroot. You can change it. It will work.

Cheers,

I tried to replace the directorys but I got page not found or a blank page.

I replaced the url in the link so the users wich copy the code use our right banner directory but the automated display in linkme.php of the images does not work.
Only the header is generated.

But never mind it is not that important ;)

StarBuG

ps: I wanted this because my forum is not the center of my project. You can have a look if you want (see my sig) ;)

Kwak 05-10-2004 05:16 AM

Thanks for the support Pseudomizer. :up:

pie 05-10-2004 11:00 AM

May i reccomend something....

PHP Code:

 if ($file == "." || $file == ".." || $file == "index.htm" || $file == "CVS") {
} else { 

Change to this
PHP Code:

 if ($file != "." || $file != ".." || $file != "index.htm" || $file != "CVS") {
$bild "./images/banners/$file";
$info getimagesize($bild);
$id filesize($bild);
.......
.......


ALSO

Why am i getting a blank page? Really wierd.

Pseudomizer 05-11-2004 01:20 PM

Quote:

Originally Posted by pie
May i reccomend something....

PHP Code:

 if ($file == "." || $file == ".." || $file == "index.htm" || $file == "CVS") {
} else { 

Change to this
PHP Code:

 if ($file != "." || $file != ".." || $file != "index.htm" || $file != "CVS") {
$bild "./images/banners/$file";
$info getimagesize($bild);
$id filesize($bild);
.......
.......


ALSO

Why am i getting a blank page? Really wierd.

Hi,

can you tell me why you are suggesting this please ? I would like to know your intention for this change.

And the reason for getting a blank page is 99% not having the template in the correct style implemented.

Cheers,

pie 05-11-2004 03:42 PM

I was just cleaning up your code....
[php]if ($file == "." || $file == ".." || $file == "index.htm" || $file == "CVS") {
} else {[php] Means.... IF $file = any of those.... { } do nothing.

I simply did IF ($file != those... then do .

As said, just cleaning your code up :p:D

JagFan 05-11-2004 07:42 PM

I have installed..works great...thanks!! :)

Erwin 05-13-2004 10:53 AM

Good idea! :)

paratek 05-14-2004 01:34 AM

Great Hack!..thanks for this one
Clicks the install

Jimmy D. Giles 05-16-2004 12:44 AM

Quote:

Originally Posted by SmartGnome
@Pseudomizer

Great hack, thanks. This was exactly what we were looking for :banana:

Install is clicked and install was piece a cake

Where did that dancing banana come from? Funny, very funny.


All times are GMT. The time now is 04:46 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.01742 seconds
  • Memory Usage 1,913KB
  • 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
  • (4)bbcode_code_printable
  • (27)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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