You are here: Re: Animated search box pull-out « All PHP « IT news, forums, messages
Re: Animated search box pull-out

Posted by J on 02/13/06 06:09

Your post is not related to php specifically - php is serverside script,
that menu stuff is mostly clientside (unless they're being built by
php-called sql results)

I decided it would be fun, so I looked into it. I won't be using any fancy
debugging tools.

Keep in mind, that the code you're viewing is copyrighted - understand how
it works and build your own.

The first thing I did was right click on the page near the menu (preferably
in the same row) and 'view source'.
Then I looked at the menu, and looked for some text that I thought might not
be very common.
I wanted to find the link you click on to get the menu to pop up. It's
right after "Threads in Forum". To make it easy, I took a look at the text
source file, went to edit find, just searched for "Forum" and clicked next
untill Threads in forum went past and then came the link. Within the <td>
is a javascript function. vbmenu_register("forumtools").
Now we find where that function/method is. search for it... you find 3
instances of vbmenu_register.. all being called, but never defined. that
means it's found in an included script.
Find the word script in the source until you see a script tag with a 'src='
attribute... there may be a few of them... whatever's in the src="", you
copy and paste into your address bar at the end of the url...
http://www.webdeveloper.com/forum/clientscript/vbulletin_menu.js
instead of
http://www.webdeveloper.com/forum/forumdisplay.php?s=&daysprune=30&forumid=16
notice that /forum/ is still there.
if you go to the js link, you'll have a choice to open or save it, save it,
and open it with your favorite plaintext editor. Get the other one too if
you care. I'm not going through the script. Read a little on javascript
syntax and maybe you'll figure it out. Pay attention to the line that says
This is not free software and may not be redistributed in whole or
significant part.

Now, the menu itself.. find text in the menu that pops up...
'Mark'
That'll do. I went to the source txt file that my browser showed me, went
to edit find, and found the word 'mark' in the source.. then again...
They've nicely commented "forum tools" menu and below that "forum search"
menu.
Looks like they've defined a <div> tag with class "vbmenu_popup" (you can
name it anything you want, you'll tell it how class 'popup' will behave
later. it's id is what disctinguishes it from the other 'popup' divs. You
could have all kinds of divs with the same classes, but all with different
IDs...

They used class vbmenu_popup. find (up if necessary) vbmenu_popup, find
will take you to the top of the page where it says .vbmenu_popup then in
curly braces { } it will define what vbmenupopups should look like...
background color, text color, border...

Hope this excercise gave you an idea how things worked. If I had time I
would go through the js file - maybe tomorrow. ;)

Good luck,
JB

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация