Using the HTML Template in AutoPost Pro

  What is the HTML Template Feature?

The template feature will allow you to have your list of posts look exactly how you want it to. All you have to do is make up a sample list, replace some of the HTML with script values, and it will look just like you had it laid out in your HTML editor.

The only downfall of this template is that it is somewhat complicated. You need to read this file thoroughly and make sure you understand it all before you attempt to edit the template. A deafault template is included with AutoPost Pro, so please look that over before you begin making changes. If you do have a problem, you can always restore the default template from the administrative script.

  Designing Your Layout

The first thing you should do is, in an HTML editor, create a list with one gallery link exactly how you want your posts to appear.

So, if you want the listing of posts to look like this:

- Pic 1 Description - Category

Then you would use the following HTML:

- <a href="url to post #1">Pic 1 Description</a> - Category <br>
  Replacing Your HTML With Template Values

Now that you've got your layout, you need to replace some of the HTML you created with values that the script can understand. Here are the values the script understands and what they mean:

Script Value What It Is
#%ID%# The ID assigned to the post
#%DATE%# The date of the post
#%TIME%# The time of the post
#%URL%# The URL to the pic page
#%PDES%# The description of the pic
#%CAT%# The category of the gallery
#%ICONS%# Icons associated with this partner*
#%COLOR%# The font color for this post*
#%SIZE%# The font size for this post*
#%[B]%# Open a bold (<b>) tag*
#%[/B]%# Close a bold (</b>) tag*
*These are used to distinguish between normal and partner posts.
#%COLOR%# and #%SIZE%# must be inside a <font> tag.
Only partner post will be affected by the bold variables.

Now that all the values have been explained, lets see how to stick them into your HTML.

Lets start off with the description value, using the sample HTML we created above.

Here's how it looked above:

- <a href="url to post #1">Pic 1 Description</a> - Category<br>
And here's how it looks when we replace the sample description with the script value:

- <a href="url to post #1">#%PDES%#</a> - Category<br>
Now we'll stick in the URL of the pic page, and link it to the description.

- <a href="#%URL%#">#%PDES%#</a> 10 Category Pics<br>
That's all there is to it. Just look through your HTML, find the script value that matches the HTML, and replace it. Now you just have to go through the remaining HTML and do the replacements.

Here's what the HTML will look like when it's finished:

- <a href="#%URL%#">#%PDES%#</a> - #%CAT%#<br>
Now, what if you don't want to show the category? Simple, just remove the #%CAT%# value and it's gone. So, if you don't want to show something just remove it's script value from the template and it will not appear.

  Finishing It All Up

To finish everything up, you will need to bring up the admin.cgi script in your browser. Log in and choose to edit the HTML for the page you want. In the template box, you will put the HTML code you created above. Make sure you are only entering the HTML for a SINGLE post. If you find yourself inserting #%PURL%#, #%PDES%#, or any of the script values more than once in the template, you are most likely doing something wrong.

Now reload the main admin page, and choose to rebuild the main page. You need to have a few posts, or test posts in order to check your layout. Then you can visit your html page to see what it looks like. Hopefully you've got it just how you wanted it, but if not just keep playing with it until you do.

  Tips For Success

Here are a few quick tips to help you with your HTML Layout.

Using tables with the template feature

When you're using tables with the template feature, there are a few things that you need to consider when setting your header/footer files, list breaks, and your HTML template.

First of all, each post is most likely going to take one table row, or <tr> HTML tag. So, in order for this to work you will need to have the opening <table> tag in the header file, and the closing </table> tag in the footer file. You will need to have your HTML template begin with a <tr> and end with a </tr>.

Next, if you have any list breaks, you will either have to make it a table row with a colspan set to the required number, or close the table and start a new table after the list break. Either one will work.

Test your layout!!

Before you begin promoting your TGP, add a few test posts and rebuild the page. You can then point your browser to the main TGP page to make sure it looks ok.