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

Postcards Plugin Available -- soon

Quote Reply
Postcards Plugin Available -- soon
Ok... I've had a few requests in the past couple of weeks for this, so I sat down to try to make it work.

Right now, I have the script working with 2.1.1 (it seems), and it should be pretty stable.

I can't find the plug-in module, so I'm trying to create an install.pm file at this point.

What's missing is the "view database" routines, and some automated features for pruning the database. These were lost in the crash, and have to be rewritten.

What it does is pretty much available on http://postcards.com

You only need to pass it a URL to an image, and it does the rest.

It uses the "new" Links SQL format of a small .cgi file and a big .pm file. It also uses Links SQL's internal date module, so external modules are required any longer.

It's controlled with template tags. You pass in all the information via the templates and hidden tags, and you should not have to edit anything in the program, or even a configuration.

What I'm trying to add to the plugin configuration is auto-age/expunge cards, and things like that. These were lost, again in the crash.

Parts of that are in some of my other plugins, so I should be able to integrate them soon.

It installs almost trivially by hand, the design goal was to make this as simple as possible, with as much power as possible, letting the script do all the work.

I'm adding in full support to take a Links ID number, and map that to a URL field, as well as accepting the URL parameter directly. This way, if you use Links SQL as your postcards database, you can pass around ID's, though it works better, and somewhat faster, logically, to store the URL in the postcards record, rather than the Links ID. The small savings in storage isn't worth the overall performance hit. *BUT* the advantage of passing in the Links ID (as well as the URL) is that you can link the post card to other data in the Links ID == such as sales information, copyrights, and more.

Cost is $45, and the only way we can accept payment at this point is via fax (credit cards) or mail cash/check/money order. Drop me an email if you are interested. I'm hoping to have a payment gateway on-line, once my account rep gets back from vacation.

Understand that your purchase of this program is greatly appreciated.

To show our appreciation, anyone who purchases the program now, will get free upgrades through all future versions. Once I have time to announce a new version, the price may go up for the new/added features, such as address books, favorites, unsends, and more. These have all been partially written, and I've actually been stalling for Gossamer Community, before implementing them.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Postcards Plugin Available -- soon In reply to
Oh,

I forgot:

You can add any tags you want simply by adding them to the templates. The program doesn't care how many tags you pass.

You can use as many templates as you want to develop the postcard -- 1 all in one template, or 10 different step-by-step templates.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Postcards Plugin Available -- soon In reply to
Will this plugin support the php frontend?
Quote Reply
Re: [xpert] Postcards Plugin Available -- soon In reply to
Wild guess...No Wink Its a completly different structure of programming, and the PHP frontend of Links SQl doesn't have a 'plugin' tool as such....its more just hacks.

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: [xpert] Postcards Plugin Available -- soon In reply to
Hi,

This is not *technically* a plug-in.

It's more of an add-on, written in perl.

It's actually *completely* stand alone, *except* it uses the Links SQL engine for database access, parsing, etc. It *never* has to read any Links table, write to any Links table, or access any Links data -- unless you want it to :)

The only thing it does is check the Plugins registry to get the name of the POSTCARDS table it installed (and maybe later on the expire times and such). (I'm using the plugin format also to make it easy for people to install and have the tables set up for them and files put in the right places.)

What this means, is that it doesn't need to run in PHP. The perl script simply acts as the go-between the web browser and the database, and if you like, you could pretend it was a php .lib file, and ignore it.

You just edit your templates. Because it uses the links parser, you can <%include%> any tags you want, call functions, etc without ever editing the script! The script only looks for certain tags you send it from the templates.

Your users will see postcards.cgi as the url, rather than postcards.php, but once they click back into your site, they'll be seeing .php files again.

In many ways this is easier than PHP, since you don't need anything but standard HTML and <%links_tags%> in your template files to control the program.

That said, the POSTCARDS database is free-standing (it requires, relies on, and links to *NO* other tables), so if you wanted to, you could access the database via PHP for card pick up, for example, and still use the perl code for creating the card.

Just remember, the perl script does a lot of other stuff -- checking for notification sending, updating the number of views, and such (this was added so that my parents could send a card to a classmates mailing list, and see how many people picked up the card, etc). Rewriting it in PHP would need to take all that into account, if you wanted to use those features.

This code got killed in the crash, but I will add it in, since they still want it. Basically, it allows creating a card, and specifying a template, then sending the pickup notification out in your email. It's an enhancement so that not only can a user send their own photos, they can use their own templates. There is no email address, since multiple people will be checking the card.

The postcards script obviously runs in dynamic mode, so jumping back to PHP is only a matter of putting the right links in your templates.

I know this is a tough thing to try to explain, but this script *really* is completely template driven!

In a way, it functions as a stripped down PHP engine (it's sort of how PHP started out). All it does is parse a set of input tags, and do something with them, using certain tags to control behavior such as dates, next template, preview, etc.

Maybe this will help a bit:

Code:
<FORM method="POST" action="<%db_cgi_url%>/postcards.cgi">
<INPUT type="hidden" name="BgColor" value="<%BgColor%>">
<INPUT type="hidden" name="cClosing" value="<%cClosing%>">
<INPUT type="hidden" name="cGreeting" value="<%cGreeting%>">
<INPUT type="hidden" name="Closing" value="<%Closing%>">
<INPUT type="hidden" name="Do" value="postcards_preview">
<INPUT type="hidden" name="ID" value="<%ID%>">
<INPUT type="hidden" name="LinksID" value="<%ID%>">
<INPUT type="hidden" name="Greeting" value="<%Greeting%>">
<INPUT type="hidden" name="Msg" value="<%Msg%>">
<%if column_name%>
<INPUT type="hidden" name="column_name" value="<%column_name%>">
<%endif%>
<%if URL%>
<INPUT type="hidden" name="Picture" value="<%URL%>">
<%endif%>
<%if Picture%>
<INPUT TYPE="HIDDEN" NAME="Picture" VALUE="<%Picture%>">
<%endif%>
<INPUT type="hidden" name="TColor" value="<%TColor%>">


This is how you control and pass information into the script.

I've been changing the templates to use postcards_ prefixes, since trying to get Links to use alternative subdirectories is flakey at best, and template crashes are starting to happen with all the plugins.

You can add any tags you want, just make sure to pass them through from one template to the next, unless they are part of the Links globals. The only required ones are URL, do, and the to/from email address. The rest of the tags depend on what your templates need -- and can be almost anything.

The URL tag is what image to display.

The do tag is what the next template (or command) to execute is.

The rest of the tags are just ordinary tags, that influence the HTML, the fields in the database, or whatever.

If there is a database field that matches one of the input tags, it will be stored in the database.

Really, really simple (I hope!!)


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Postcards Plugin Available -- soon In reply to
Nice job pugdog. The standalone "add-on" concept is one which I am aiming for with some of my own things. I am not quite there yet (do to the nature of the plugins I have done), but it looks like you are.


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Postcards Plugin Available -- soon In reply to
Not quite there?

hehehehe

Uh huh...sure your not! LOLCool
Quote Reply
Re: [Teambldr] Postcards Plugin Available -- soon In reply to
Ok, so maybe we areTongue


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [pugdog] Postcards Plugin Available -- soon In reply to
We were really busy in the store (which is a *good* thing!) and I haven't had the chance to update this. If things are a bit quieter, I should have a "beta" of the plugin (it's the plugin that's my delay here, not the script) to try out tonight, or tomorrow.

The plugin will create the POSTCARDS table, copy the templates and files to the right area, and try to do some minimal error checking on install.

I had some pretty good error checking before the crash, and I'm trying to pull the fragments of that out of what other plugins I have salvaged. I had *almost* got an understanding of GT's error handling in the plugins <G>... Almost.

If you want the postcards script, I can give you installation instructions before the plugin is done -- you need to copy the files into the right location, set the permissions, create the POSTCARDS database (just a cut/paste into SQL Monitor), copy a .def file, trick Links into updating the .def file, then run the Postcards.tar file as a plugin to set the one (at this time) parameter in the plugins file. Simple, if you have FTP access to your server, and know just a tad about Links SQL.

I've run this on 3 different servers and flavors of Unix, but I'm sure there will be some things I'll have to tweak or fix once the program starts to run on other people's machines. As far as I can tell, it's not dangerous, and since it doesn't need to hook into Links SQL, it shouldn't impcat that at all.

Oh... one of our "key" features has been weather cards, and before our crash, they accounted for well over 25% of the cards sent from our sites.

I'm about to pop over to HamWeather.com and see if the new version is out yet, and try to get it integrated back in.

What this is, is HamWeather generated a graphic (or text file) of the current conditions, and that was inserted into the postcard as the URL or message body.

That capability will be included in the script (as soon as it's available), for anyone who gets it. (HamWeather isn't... that's up to you to install <G>).


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Postcards Plugin Available -- soon In reply to
I've been working on the installer, and of course getting sidetracked by the details, but I'd rather not have to go through this again...

I've got reasonable error checking, the two parameters, and table creation working.

I need to get the templates inserted, and installed, and then update them a bit to get rid of some old formatting.

The templates will install into the /"default"/local directory (as defined in your admin config). This is where most people will want them.

Soon....


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.