Документация ComusThumbz
Вход для Администратора

Pages Help File

The [Pages] section allows you to create, edit and build pages (generally referred to as templates) using your browser. It requires a fairly good knowlege of HTML, although you can use a WYSIWYG HTML editor and copy/paste the source into these pages. If you want you can also bypass the web interface and just use direct FTP to upload/download files (see below).

There are several example templates to get you started, and these can be selected when creating a page. First choose the template type, if it's a standard page the script will choose a default file name for you, otherwise you will need to specify a source file and target file name.
 
You have your choice of at least the following default template types when creating pages..
 Prod Booster - This is the template that we have been using to boost our sites, it requires that the site is set to rebuild every few minutes, 10 minutes seems optimal.
 Daily - This template is an example of how to build the site only once per day, pulling a minimum of galleries, and sorting galleries by most clicked.
 Archive - You can create special archive pages which use category names to dynamically list links and thumbs, see archive pages below.
 Blank - A blank page.
 Default Frame - The default frame for use when gallery framing is activated, see Gallery framing below.
 
Building Multiple Pages.
 You can add as many pages as you like, but keep in mind that each page incurs a load on your processor.
 
 For example, on average it takes the script about 15 seconds to build a page of 200 links using a Celeron 1.3ghz. Keep this in mind if you choose to build lots of pages, for example that means you can expect it to take 150 seconds to build 10 pages and 300 seconds to build 20 pages. That means if you set the script to rebuild everything, every 5 minutes, you could put the script into a constant state of rebuild.
 
To assist with this there are a couple of special macros which can be used to lower the load on your server.
 
{{buildonce}} when placed on a template will cause the page to only 'build once' per day. It's perfect for archive pages say if you have 100 archive pages, then once per day the script will build all the pages, and you can still have a 5 minute rebuild on your main page. You will notice on the default archive template that this is enabled.
 
{{archivepage}} is a special macro used to strip all the special rebuild codes and recip links from a page. Normally a page has a special code placed on it, directly after the <body> tag, which tells Comus to rebuild itself periodically, if this special code is not present then this page can not trigger rebuilds, so you need to avoid the {{archivepage}} macro on at least one page, usually on your main page.
 
{{hiddenupdate}} In the free shareware licence a site will have the 'more comus sites here' macro present on all pages, you can purchase the option to remove this link, if so, then this macro will remove the 'more comus sites here' links.
 
Archive Pages
 You are not limited to making archive pages of any name, but the script allows you to create special prebuilt archive templates.
The script will scan your range of defined categories and give you the option to choose which page you want to add to the build sequence. Note that these pages make use of a special
variable called %templatename%. %templatename% will strip the name off the source file name and then use that throughout your page. The default template uses this to allow you to
quickly create a default archive template which can then be reused for all your other pages, once you've layed the first archive page out how you like, you can then create new pages and
copy and paste your custom template into your other template pages, if you've made use of the %templatename% and teh default page names then you should find creating multiple categories fairly quick.
 
On the other hand, you dont have to use the %templatename% variable and the default page names, you can create pages of any name you like.
 
You might notice the Archive pages also use the {{buildonce}} macro, this limits the archive page from being built multiple times per day, and limits it so that it can only be built once per day. It's intended to keep the load on your server to a minimum in the case of multi page sites.
 
Gallery Framing.
 Each category can have it's own unique header added to the top of its galleries. You can use this frame area to promote your own sponsors, or link to trades, the dimensions of the gallery frame can be edited within the /ct/gal.php file, if you need to make it larger or smaller. 
 
Using FTP instead of the web interface.
 You can choose to edit and upload the files directly using FTP. By default all files are put into the /ct/templates/ folder, but you can actually place the files anywhere on the drive, as long as you reference them using relative paths from the /ct/templates folder. Make sure if you upload files to be built that the script has permissions to modify them, you will probably want to chmod 777 them. You can use the [Add Page] option with custom settings, or alternately if you understand the 'makefile' format you can edit the 'Make Files Template' section under the [Templates] link.
 
Changing the Build Order
 You might want to change the build order to control in what order the thumbs are extracted. For example you will probably want your index page to be built before your archive pages so that it can pull the new thumbs and reserve the old thumbs for the archive pages. You can modify the order in which the pages build by going to the [Templates] link and editing the section called Make Files Template. By changing the order of the {{makefile- entries you can tell the script which files get made first and which ones last.

Troubleshooting - FAQ.
"When editing my pages wont save, and I'm getting all these wierd 'fopen' errors."
  Check the file permissions of the files, particularly if you have uploaded them by FTP and are now trying to edit them from the web. Comus doesnt have permissions to modify the files, so chmod them to 777.

"When building the script won't create my pages."
 Check that Comus has permissions to modify the target files. The most common problem is that the web root folder isnt set to allow Comus to create new files. The easy fix to that is to chmod the web root folder to 777 so that Comus has permissions to create the target file, if you dont feel comfortable with that for security reasons, then you will need to create a target file and make sure that comus (apache) has the correct user permissions to modify that file.
 
"I'm using TM3 in CGI mode, how do I set the target filename?"
 Usually TM3's index page is located 1 folder above webroot in a tt/idx/ folder.. But this is not always the case, sometimes they place it in another location and name it something other than tt. There's no standard method that they use so you're going to have to get their help, or work it out yourself. Know this, Comus by default writes files to the /ct/templates folder, and all paths are relative from that location. If you have a site in the "/home/admin/public_html/" folder, then comus target files are usually located in the "/home/admin/public_html/ct/templates/" folder and TM3 index pages are usually located in "/home/admin/tt/idx/index.html" so the target path you would want is "../../../tt/idx/index.html".
"I didnt install the script to the /ct folder, and now its not writing files to the correct folder"
 Lol, we told you so, for best use install it to the /ct folder. It can work but you might need to add a $comuspath='YOURPATH'; variable to the licence key so the script can find where it is installed.
 
"I'm not getting any errors but I cant find the file it is making?"
"I want to write to another folder other than web root, how do I work out the path?."
 All target files are relative to the /ct/templates folder.. thus if you want to write to the webroot then you would use a relative path such as ../../targetfile.html . Thus if you wanted to have a link such as http://yourdomain.com/Teens/index.shtml you would need to have a Target file something like ../../Teens/index.shtml
 
"I want to send the files to another server"
 Get your sysadmin to setup Samba, it's tricky but can make remote drives appear as local folders.
 
"The trade script isnt working, it's attaching /ct to everything and sending all links to /ct/ttt-out.php (or something like it)"
 Prefix your trade script setting with '/' so /ttt-out.php?blaaa would be correct.

Tips and Tricks
"Trading with unique trades off each archive page, using multiple installations of TTT"
 This is an interesting technique, the idea is to install multiple copies of TTT into subfolders. This allows you to setup each page as if it was it's own unique site, and each category has it's own set of niche targetted trades. The intention is to drive productivity up by niche targetting everything.

First you want to write to create a unique folder for each of your categories, and then you want to tell the script to write it's pages to the folder. For example, Teens target file would be "../../Teens/index.shtml" (without the "").

Now you want a unique database for each installation of TTT, install it directly to the Teen folder, not to the webroot.

Now you need to setup the trade script settings so that it will send all traffic out for your teen thumbs to the correct trade script. You will want it set the thumb link prefix to

/%group%/ttt-out.php?pct=%tshave%&link=THM%group%&url=

and set the text link template to..

/%group%/ttt-out.php?pct=%lshave%&link=TXT%group%&url=

make sure you include the leading /

Now the macros on the page can either be forced using the %templatename% variable, (which will be needed if you are using hidden categories), or for standard links you can leave comus to choose which outgoing trade script it uses based upon the category.

To set every link on a page to use the %templatename% code you would, for example...

{{%templatename%##all-thumb-1}}

Which if the source page was called 'Teens.tmpl' would force this link to send the group code of Teens through to the trade script.