Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[New Plugin] PPC Banner

(Page 1 of 2)
> >
Quote Reply
[New Plugin] PPC Banner
Ok, I started this a while ago, but have only just found the time to complete it. Basically, it allows you to serve banners on your site. Each time someone clicks on a banner, a certain amount of credit is remove from their account. They can update thie credit by sending you (the webmaster) money via PayPal. The whole process is automated, so you just gotta watch the money roll in Wink

I've made it a freebie to download, but if you do use it I would really appreciate some money in return for it. This will help me keep writing new plugins in the future, and updating existing ones Wink

The plugin is attached. I've beta-tested it as much as I can locally, but my main server is having MySQL problems, so I can't test it on there. If you find any problems, please let me know and I'll try and fix 'em up Smile

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
Good one Andy!!

I am a little poor right now... but if I use it will send you some $$.

I thought I would try installing it to test it for you though.

Unforutnatley I am getting errors, and none of the menu items will work.

Example Banner.pm:Bareword "head" not allowed while "strict subs" in use at Banner.pm line 40.Unquoted string "head" may clash with future reserved word at Banner.pm line 40.syntax error at Banner.pm line 40, near "head>"Bareword found where operator expected at Banner.pm line 42, near ""Content-Type" content" (Missing operator before content?)Bareword "content" not allowed while "strict subs" in use at Banner.pm line 42.Unquoted string "content" may clash with future reserved word at Banner.pm line 42.Bareword found where operator expected at Banner.pm line 43, near "


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] [New Plugin] PPC Banner In reply to
Couldn't update the above post...here is the new Banner.tar file (i was missing a qq| Wink)

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
In string, @ace now must be written as \@ace at Banner.pm line 38, near "$50 to


This is the perl check report AndySmile






http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: May 31, 2002, 11:31 AM
Quote Reply
Re: [Ian] [New Plugin] PPC Banner In reply to
Mmm...I didn't get that error. All my one said was: Perl Said:.

Anyway, here is the updated version. Alex asked me to rename it, so it doesn't clash with any of their plugins Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
Cool Andy... I'll try and test again for you.

BTW... nice graphic you have for your name Wink


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] [New Plugin] PPC Banner In reply to
>>>Cool Andy... I'll try and test again for you. <<<

Thanks Smile

>>>BTW... nice graphic you have for your name <<

Thanks...a guy I know did it for me. it used to be my sites logo...but now I've decided to go a little more basic on my sites logo Tongue

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
Well, its a nice logo, I like it! Mine does not blend in well (some white showing on the edges), so I am going to re-draw it just for the forumWink.

This is the only error I seem to be getting now Andy:

(I wonder why these things compile on some machines and not on othersCrazy)

Global symbol "$url" requires explicit package name at PHP_PPC_Banner.pm line 262.
PHP_PPC_Banner.pm had compilation errors.



http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] [New Plugin] PPC Banner In reply to
Oops...here we go Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
Well it installs now... I will check the banner part as soon as I get the chance Smile

Maybe you could test out my editor plugin as soon as it ready (today hopefully!).

I have decided to make it a small price, but FREE for those who helped me make it like You, Paul, Webmaster, Yogi, Pugdog... I agree with you, you should be rewarded for your efforts, even if it is a small reward.

Smile


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] [New Plugin] PPC Banner In reply to
>>>Maybe you could test out my editor plugin as soon as it ready (today hopefully!). <<<

No problem. I may not be in when you release it, but I'll give it a go for you on monday or tuesday Smile

>>>I agree with you, you should be rewarded for your efforts, even if it is a small reward. <<<

Couldn't have said it better myself Tongue

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Ian] [New Plugin] PPC Banner In reply to
Hi. Have you/anyone had a chance to test the script yet? I just wanna know if there are any bugs I missed Tongue

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
Hi Andy, I havn't yet... I have been busy trying to get my plugin working and out.

I will test today hopefully!

At this stage, it does install correctlySmile


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
You have errors in your template extraction code.

Chmod your template directory to 644 and try to install the plugin. You'll get an error like:

Can't locate method "error" via package PHP_PPC_Banner at Install.pm line yada yada

You need to change all occurances of:

$file->write or return PHP_PPC_Banner->error( ... );

to

$file->write or return Plugins::PHP_PPC_Banner->error( ... );

You might want to add an option in the installer to allow the user to confirm whether or not to overwrite templates otherwise it will get annoying if you customize the plugin templates and the installer overwrites them if you ever install it again..

Last edited by:

Paul: Jun 3, 2002, 8:34 AM
Quote Reply
Re: [Paul] [New Plugin] PPC Banner In reply to
Mm..thanks Paul. I'll get that fixed up. Thats the good old online plugin maker fault again Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
Ok, heres the latest, with the bug fix Paul mentioned.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
Ok....version 1.1 has been released now. Has a few bug fixes in it, along with a missing file Tongue

It is now a 4 day trial plugin, so if you use it after that period of time, please purchase it.

Well, you can download the latest version from the Links SQL Plugin download page. Enjoy Smile

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
Hi Andy,

I am not sure if you have already found this. But when you uninstall the plug-in the global it creates is still left in the globals.

Sorry, I just noticed this from the first day when I was going to test!!


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] [New Plugin] PPC Banner In reply to
Yeah...I'm not quite sure how to remove it Frown

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
I am going to ask a really dumb question, so be warned!!

Why can't the global just go into your plugin.pm as just another funciton, and be called that way?

Like: <%Plugins::PPC_Banner::TheBanner($something)%> ?


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] [New Plugin] PPC Banner In reply to
Cos it is banner.php that calls the banner (i.e can't be run as a Links SQL plugin as such..thats why I have to call it that way Tongue

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
Ahhh....

And I guess

my $template_set = $CFG->{build_default_tpl};
my $globals = GT::Config->load($CFG->{admin_root_path} . "/templates/$template_set/globals.txt", { inheritance => 1, compile_subs => 'Links', local => 1, cache => 1 });
$globals->{newkey} = 'new value';
$globals->delete;

won't work?

I am not much help... sorry.


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] [New Plugin] PPC Banner In reply to
No..I don't think that delete command will help. I think I see where you are coming from now though with your last question.

Are you saying, have a function in PHP_PPC_Plugin.pm, and then using a tag to call the plugin, which will return the IFRAME code to the templates?

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [New Plugin] PPC Banner In reply to
Yes, that is exactly what I am saying.

sub global_title {

put your global here

}



then just call it wiht the <%Plugin::Mypluginname::global_title%>

thats what I am doing, and it works for me! so it might work for you with this!Smile


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] [New Plugin] PPC Banner In reply to
To delete a global you can use:

my $template_set = $CFG->{build_default_tpl};
my $globals = GT::Config->load($CFG->{admin_root_path} . "/templates/$template_set/globals.txt", { inheritance => 1, compile_subs => 'Links', local => 1, cache => 1 });
delete $globals->{newkey};
$globals->save;

Cheers,

Alex
--
Gossamer Threads Inc.
> >