Loading

Author Topic: [New Plugin] Template generator - for creating HTML ad templates  (Read 1127 times)

Jesse

  • Hero Member
  • *****
  • Posts: 509
  • Out of my mind, back in 5 minutes
    • Nuclear Projects
    • Email
[New Plugin] Template generator - for creating HTML ad templates
« on: February 10, 2012, 12:56:48 pm »
Latest update: Version 1.1 fixes issue with Permalinks (friendly URL's) not working properly

Hi all,

I'm pretty much done with this plugin, for now. It's fully working, including a single template. As always, feel free to post any comments regarding bugs, suggestions, etc. However, I will not be supporting additional templates at this time, it's just way too time consuming for me. However, if you know HTML, you'll be able to create/modify your own.  :) It's completely laid-out using tables (only real option Craigslist will support).

What does it do:
This plugin creates HTML templates with copy-and-paste HTML code that you can use on other sites, such as eBay and Craigslist. The ads can then link back to the actual ad on your website.

When this plugin is installed, a link to a new page will show up in the User Account Manager, labeled, "Generate HTML Template". This page will present you with a drop-down selection box that you can select which of your ads you'd like to generate the HTML template for. Once you've made your selection, the preview will automatically be generated along with a box containing the complete HTML code. Simply select all the code and "copy" it and use it as you'd like.


The template:
There is now a single template included. Feel free to edit it as you wish. The blue background is made-up of 3 different PNG images, so if you wish to change the size of the ad template or colors, you'll need to edit all three.
« Last Edit: February 15, 2012, 11:30:56 am by Jesse »
Some helpful OSClass pages and customizations I've worked on... http://doc.osclass.org/User:Jesse
Please, no questions via email. Ask them on the forum.

freeeadz

  • Newbie
  • *
  • Posts: 42
  • E-Adz
    • E-Adz
    • Email
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #1 on: February 10, 2012, 04:26:51 pm »
Jesse,

this is a great plugin indeed but its not working well........as I tried it.

Actually when I select the ad to generate template and click on the button provided to generate template it generates no template but the it generates only Home Page of my website.

There is a suggestion also that the ads should be displayed in Descending order.

Jesse

  • Hero Member
  • *****
  • Posts: 509
  • Out of my mind, back in 5 minutes
    • Nuclear Projects
    • Email
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #2 on: February 10, 2012, 09:54:00 pm »
Hi Freeadz,

Thanks for the report! I'll take a look into that. Although I did install and test this onto two separate installations of OSClass, which worked fine, so I'm puzzled why this might not be working for you. But I'll certainly dig-in and try to find any bugs! It could be my use of an iFrame, or perhaps POSTing of the data to a separate php page, Preview.php. I'll look at it.

As for ordering the ads, I'll arrange them in alphabetical order. That actually was on my "to do" list, but I forgot about it.  ;) So thanks!
Some helpful OSClass pages and customizations I've worked on... http://doc.osclass.org/User:Jesse
Please, no questions via email. Ask them on the forum.

Jesse

  • Hero Member
  • *****
  • Posts: 509
  • Out of my mind, back in 5 minutes
    • Nuclear Projects
    • Email
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #3 on: February 10, 2012, 10:39:02 pm »
Freeadz,

If you could, take a look at the browser source code for the "Generate HTML Template" page. You should see some lines of code like this near the bottom of the code, which SHOULD contain valid URL's, like the samples below. With the iFrame returning your website itself, that indicates to me that your site isn't finding the "preview.php" page, which it should...

Code: [Select]
    <form action="http://yoursite.com/osclass/oc-content/plugins/template_generator/preview.php" method="post" target="my_iframe">
<input type="hidden" name="data" id="data" value='' />
<input type="submit" value="Click To Generate Preview" />
    </form>

    <!-- when the form is submitted, the server response will appear in this iframe -->
    <iframe name="my_iframe" width="100%" height="800" src="http://yoursite.com/osclass/oc-content/plugins/template_generator/preview.php"></iframe>
Some helpful OSClass pages and customizations I've worked on... http://doc.osclass.org/User:Jesse
Please, no questions via email. Ask them on the forum.

trains58554

  • Super Moderator
  • Hero Member
  • *****
  • Posts: 1817
  • The Ghostbuster
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #4 on: February 10, 2012, 10:45:28 pm »
Hi Jesse,

I found a small glitch.  :o When I generate a template and then select a different ad and click generate it takes me back to the first page with just the select box and button. After I see that screen I can then click the button and it generates the template.

Other then that small glitch it seems to work as intended.

Jay

Jesse

  • Hero Member
  • *****
  • Posts: 509
  • Out of my mind, back in 5 minutes
    • Nuclear Projects
    • Email
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #5 on: February 11, 2012, 01:11:56 am »
Hi Jay,

That effect normal. When you make a selection with the drop-down, it auto-submits the form to retrieve the data from the database for that selection. So during the submit process the page gets reloaded. So after every new selection, you need to click the "Click To Generate Preview" button. The fact that the "previous" preview isn't still on the page shouldn't matter. I will work on all this to make it more seemless and less "confusing". Again, this is still very much in testing and development mode, definitely not a "ready out-of-the-box" plugin, yet.  :)

I'm having to use an iFrame because the CSS for the site interferes with the styling of the table. Trying to reset all the styles for just that page was a nightmare, so in order to get a true preview of the template, the iFrame was needed.

It is good to have all this feedback! I'll definitely use both yours Jay and freeadz to make some improvements.
« Last Edit: February 11, 2012, 01:15:52 am by Jesse »
Some helpful OSClass pages and customizations I've worked on... http://doc.osclass.org/User:Jesse
Please, no questions via email. Ask them on the forum.

trains58554

  • Super Moderator
  • Hero Member
  • *****
  • Posts: 1817
  • The Ghostbuster
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #6 on: February 11, 2012, 01:30:17 am »
Hi Jesse,

I kind of figured that was what was going on there but I did not look at the code to verify. I wonder if you could not make use an ajax call to refresh the data? It is looking great already and I know it will look awesome once it is done.

Jay

Jesse

  • Hero Member
  • *****
  • Posts: 509
  • Out of my mind, back in 5 minutes
    • Nuclear Projects
    • Email
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #7 on: February 11, 2012, 01:35:36 am »
I think you're probably right about using AJAX.... it's what I use with my Picture Director plugin to auto-save the picture orders. I'll look into it!  :D
Some helpful OSClass pages and customizations I've worked on... http://doc.osclass.org/User:Jesse
Please, no questions via email. Ask them on the forum.

Jesse

  • Hero Member
  • *****
  • Posts: 509
  • Out of my mind, back in 5 minutes
    • Nuclear Projects
    • Email
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #8 on: February 11, 2012, 07:29:34 am »
Ok, I've updated the plugin. The drop-down selection box is the only thing the user will need to do. Once the desired ad is selected, the preview will automatically display along with the HTML source code.
Some helpful OSClass pages and customizations I've worked on... http://doc.osclass.org/User:Jesse
Please, no questions via email. Ask them on the forum.

trains58554

  • Super Moderator
  • Hero Member
  • *****
  • Posts: 1817
  • The Ghostbuster
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #9 on: February 11, 2012, 07:55:39 am »
Hey Jesse,

That works great I like it.

Jay

Jesse

  • Hero Member
  • *****
  • Posts: 509
  • Out of my mind, back in 5 minutes
    • Nuclear Projects
    • Email
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #10 on: February 11, 2012, 08:41:17 am »
Awesome, thanks Jay! I appreciate your testing.



UPDATE: I've since modified the drop-down box to sort item titles alphabetically.
« Last Edit: February 11, 2012, 09:19:09 am by Jesse »
Some helpful OSClass pages and customizations I've worked on... http://doc.osclass.org/User:Jesse
Please, no questions via email. Ask them on the forum.

ingo

  • Full Member
  • ***
  • Posts: 221
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #11 on: February 11, 2012, 10:43:48 am »
Hi Jesse,


"that rocks" really great work,
- link to page, as you said - comes, great – maybe option to choose:
add link or not to template, because some pages don’t alows linking
-         Maybe title of mother page on top
-         Maybe adding phone number to code - if displayed in item / filled out in user profil 
If you want I can make some proposal designs to your plugin
Once again great, great - Thank you for this plugin

Jesse

  • Hero Member
  • *****
  • Posts: 509
  • Out of my mind, back in 5 minutes
    • Nuclear Projects
    • Email
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #12 on: February 11, 2012, 11:23:37 am »
Hi Ingo,

Thanks for the suggestions! I'm certainly open to any design ideas you have. It would be nice to have several "templates" with different designs that the user can select from.
Some helpful OSClass pages and customizations I've worked on... http://doc.osclass.org/User:Jesse
Please, no questions via email. Ask them on the forum.

ingo

  • Full Member
  • ***
  • Posts: 221
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #13 on: February 11, 2012, 11:37:22 am »
Hi,


great



I will start immediately

ingo

  • Full Member
  • ***
  • Posts: 221
Re: [New Plugin] Template generator - for creating HTML ad templates
« Reply #14 on: February 11, 2012, 01:35:26 pm »
Hi,


I have couple templates finished,


1. serie called - simple > Attachment   > wholle series on my page, pm sent

2. serie - in work - results - laltly today > unfortunately, don't have any time more to play

Jesse, tell me which size of Tamplate you prefer, I'm open for your ideas


regards
« Last Edit: February 11, 2012, 01:38:52 pm by ingo »