PDA

View Full Version : Question I have been unable to find the answer to.


da420
11-29-2005, 04:47 AM
i have vBulletin 3.5.1, and I have been looking for an answer to this question for some time, and an answer would be much appreciated.

How do I make a pop up window for rep instead of it loading the page within the same page ?

Thanks.

da420
12-01-2005, 08:05 PM
-Bump-

Anyone?

Marco van Herwaarden
12-01-2005, 10:21 PM
This has been many times discussed on vb.com i think. You will probably also find an answer there.

da420
12-01-2005, 10:38 PM
I asked vbulletin.com.

"For 3.5.1 I believe this requires modifying the code. Try asking for help with this over at www.vbulletin.org." -- http://www.vbulletin.com/forum/showthread.php?t=164972

That is what they said. I was hoping for an answer here.

Startinfresh
12-01-2005, 11:41 PM
I would be curious to find out too. Kind of a PITB with the new page thing.

da420
12-02-2005, 03:47 AM
No one has any answers ?

I search and search, vb.com tell me it requires modifying the code and refer me to here. Here I get told to go to vbulletin.com. I can't find anything by searching because the words rep, pop, and up are too short of words to search for.

I would really just like a straight answer. Thanks.

da420
12-03-2005, 02:17 PM
Does someone know how to do this ?

Can someone please at least point me in the right direction ?

I have asked this at both places, searched my arse off, without an answer. If it cannot be done, just say it.

I would really appreciate this.

Thank You.

DDad
12-03-2005, 03:26 PM
How about hacking the template for a new window and not a pop up?

da420
12-03-2005, 05:41 PM
How would I do that? I am new to this, and just want a simple pop up instead of opening in the same page.

Basically, what and where would I have to mod this code ?

Thanks.

DDad
12-03-2005, 06:41 PM
I don't use rep and I don't know what template to play with but here is a code to open a new window. I would mess around on a test site first. Where you see newwindowhere is where you want to put the url and there is different ways of putting the url in.
<a href="<a href="http://www.newwindowpagehere" onClick="window.open('http://www.newwindowpagehere', 'window_name', 'toolbar=yes,location=yes,directories=yes,menuBar= yes,scrollbars=yes,resizable=yes,width=970,height= 550,left=10,top=10'); return false"> Text here </a>

da420
12-03-2005, 07:14 PM
Well thanks for that... just wish i knew which template, and where to put it...

rb290
12-06-2005, 03:33 AM
ya can we make it as a option in the vBulletin Options whether we want it to open as a pop up or in a new window.

baronvonwalz
12-06-2005, 04:51 AM
I had to do this for my forum, many users were unhappy with the current system.

Give me a day and I can make an install for you all :).

It might take more than a day, I want to work it into the plugin system instead of altering the files.

da420
12-06-2005, 05:33 PM
That would be really sweet baron! I have been searching all over and I cannot find a straight answer for this question, so your help is mucho appreciated!

baronvonwalz
12-06-2005, 07:16 PM
Ok, the code isn't perfect, but here goes.

Replace your reputation.php file with the attached reputation.php file (it's just the vB 3.5.0 reputation.php file).

Then goto your styles and templates, and under your SHOWTHREAD template, find the following.


<head>
$headinclude
<title>$thread[title]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if> - $vboptions[bbtitle]</title>

And underneath it add.


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=400,height=229,left = 362,top = 284');");
}
// End -->
</script>

Then open up your reputation template under your User Reputation Templates Group, and remove the following.


$headinclude
$header
$footer

After that, open up your reputationbit template, find and remove the following. It should be at the beginning.

<div style="width:$stylevar[formwidth]" align="$stylevar[left]">

The next step depends on whether you use the horizontal postbit or the legacy postbit, the code changes are exactly the same, but they are in different positions within the template.

If you are using the horizontal postbit version, find the following code:


<if condition="$show['reputationlink']"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a> &nbsp;</if>

And replace with.


<if condition="$show['reputationlink']"><A HREF="javascript:popUp('reputation.php?$session[sessionurl]p=$post[postid]')"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" border="0" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" /></A></if>

If you are using the legacy version, find the following code:


<if condition="$show['reputationlink']"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" border="0" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" /></a></if>

And replace with:

<if condition="$show['reputationlink']"><A HREF="javascript:popUp('reputation.php?$session[sessionurl]p=$post[postid]')"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" border="0" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" /></A></if>

And that should do it, I'll warn you right off the bat that this hasn't been tested with vB 3.5.2 yet.

EDIT: File removed as full vBulletin files are not allowed to be attached here and the license was still showing at the top of the file.

da420
12-06-2005, 08:19 PM
You are the man Baron! Been looking for this for a while now! I will try it when I get home as I cannot install any programs at my work computer.

Just curious; when you say "the code isn't perfect," not quite sure what you mean by that, so a little elaboration would be helpful.

Thank you! I will let you know if it works on my board.

baronvonwalz
12-06-2005, 09:01 PM
I mean that this is not professional grade, but it gets the job done.