News:

Wondering if this will always be free?  See why free is better.

Main Menu

Popup Window on Forum index Load

Started by generustman, June 13, 2011, 12:17:37 PM

Previous topic - Next topic

generustman

We are a user donate supported forum. Donations are low at times with just the donate button but when I mass email they come up.

I have an idea I think might help and keep me from emailing so much but looking for some help on how to do what I want.

When a member logs into our forum I would like a say 400 X 200 popup window to show up with our PayPal donate button in it that the member can either click to donate or has to close the window.

Can anyone help me with coding this? I have tried a bunch of different 'onload' commands but can seem to get this too work right.

Thanks in advance!

Dzonny


generustman

Nice. I was trying javascript but will try to play with this a little. Tried but error'd but will keep playing unless someone else has a better idea

Also where should I place code? Ideas? Tried theme index.php but hats where  I got the error when page loads.

yakyakyak

Maybe a "block" if you are using any portal software?

I recall one of the Portal home support sites covering this before with javascript popup code for paypal donate, if you have a look at their support sites and "block code" boards i am sure you will find many solutions. it was i think tiny portal or ez portal.

Dzonny

If you attach index.template.php i can help you to add this.

generustman

Index.template.php puts it on all pages...didnt like that so added the following code to boardindex.php in the theme I use and it works if anyone else needs this....

<HEAD>

<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,menubar=0,resizable=0,width=400,height=200,left = 312,top = 284');");
}
// End -->
</script>
</head>
<body>
<BODY onLoad="javascript:popUp('html page of my popup window with paypal donate button in itl')">

Sir Osis of Liver


How does that get around popup blockers?  They'll normally kill any popup that's not user requested.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

generustman

It wont get around popup blockers. But as a majority of my users dont know how to block them I am not too worried about that. If I get a majority of them then maybe it will help me pick up more donations

Sir Osis of Liver


Popup blockers are enabled by default in most browsers, and most users will not, or won't know how to disable them.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Xarcell

I think the best thing for you to do is install Dream Portal and put the code in a module.

generustman


Xarcell

Quote from: generustman on June 13, 2011, 11:53:53 PM
Xarcell,

Would love more info

Just click on the link in my signature. That's the mod that adds a portal to your site. Then create a custom module and place the code you have inside it. That way you don't actually have a popup, but everyone will see it wherever you want them to see it. better than altering template files or having an annoying popup that will run visitors off in my opinion.

Advertisement: