Forum
Subscribe


Output Functions

How to change the default text and/or appearance in any of the output related functions

Each function in the functions.inc.php has defaults. The text you see in there is just the defaults. Actually every bit of text you see - even text that comes from functions.inc.php - can be changed by editing the pages in the pages directory. Here is how:

You are used to use using part of this feature for settings say, in for example the PTSU function. Normally you put:

<?php get_pts_ad('GROUPNAME'); ?>

and that's it - however there is much more that the feature can do. The following parameters can be changed in this function, they start from left to right, wherever you stop, the rest from that point will stay as the defaults. For example if you only put the group name then the rest will be the defaults however here is the entire command:

<?php get_pts_ad('GROUPNAME', 'Sign-up for the site above to earn','Sorry, no sites are available for you to sign-up for at this time','point(s)','cent(s)', 1,'<b><Next Page></b>','<b><Previous Page></b>','Paste your confirmation email message for the above site here','Submit confirmation email'); ?>

So for another example, if you want to change the pts.php page to show '<<' for Previous page and '>>' for Next page, instead of the default you normally see at the bottom of the page, you would replace the get_pts_ad command on the pts.php page to this:

&amp;lt;?php get_pts_ad('GROUPNAME','Sign-up for the site above to earn','Sorry, no sites are available for you to sign-up for at this time','point(s)','cent(s)', 1,' &amp;gt;&amp;gt; ',' &amp;lt;&amp;lt; '); ?&amp;gt;

You would not need to put any of the remaining settings ('Paste your confirmation email message for the above site here','Submit confirmation email') because you are not wanting to change them. And if you wanted to also change the text that shows in the text box, you would just replace 'Paste your confirmation email message for the above site here' with the text you wanted, and include it in the command above.

This feature has been in the Cash Crusader scripts from day one - output for all pages could be changed without ever changing the files in the scripts directory. The structure of the functions will never change - if something new is added to it, it is added to the end of the function, so any custom templates a person makes will always continue to work. This also allows the CC scripts to support any language, any currency and any wording the site owner would like, without the changes ever being lost in an update. This applies to all the functions that output info to the members.