Oprano.com
Oprano -> The best of Oprano -> TGP Group Project Steps 1-4.

TGP Group Project Steps 1-4.


Written by: ReighlynnRaine

 

I slapped this together so all of the project info is in one place. The original threads to the steps are included but all the extra comments have been cut out. I hope this helps.

Step 1 - Original thread: http://www.oprano.com/msgboard/showthread.php?t=42846

The immediate build is a page (or pages) fed from Remothe thumbs with the idea being that we are later wanting to to do trades and possibly accept webmaster gallery/site submissions.

So, that being the case, step one would appear to be going over to Remote Thumbs (http://www.remotethumbs.com) opening up an account, setting up our sponsor codes and putting together a template or two.

some good addresses to know during this step are:

http://www.smutforum.com/ The support forums for remotethumbs
http://www.remotethumbs.com/manual/ The remotethumbs user guide

Once you have an account on remotethumbs you want to log in to the site, go to the menu item called "My Sponsors". This will take you to a page that will allow you to enter your affiliate codes for any sponsors that remotethumbs has galleries for. If you don't have enough sponsors, then right there on the "My Sponsors" page you can go to the various sponsor sites and sign up for an affiliate account.

I would suggest having at least 10 sponsors in order to get enough new galleries each day. The more sponsors that you have codes for, the more galleries that you can pull in each day.

Once you have your sponsors set up, you can go through the user manual step by step and set yourself up or you can wait till tommorrow when I will do "Prepping the server and setting up templates"

Step 2 - Original thread: http://www.oprano.com/msgboard/showthread.php?t=42864

Click the above link for RT settings and Templates. ****ATTENTION: Before testing the script make sure you have dowloaded it and then uploaded it to your server. ****

If you want text links, follow this link: http://www.oprano.com/msgboard/showthread.php?t=42887

Step 3 - Original thread: http://www.oprano.com/msgboard/showthread.php?t=42902

Ok, so by now, we should be all set up on remotethumbs. We should have generated a template file, so we should have a file available for testing up on our server (remotethumbs put it there when we generated). So, now we can start to build a page or two.

We can pull in the remote thumbs generated table several ways:

1. we can use a server side include (ssi) call to pull in the file.
2. we can use a php include call to pull in the file.
3. we can write a custom routine to pull in the file.

(not to insinuate that there are not other methods)

I will go through all 3 of these different ways to do this.

No matter how we are going to do it, we need a page to pull the file in to.

For right now, so that we can get an idea of what is going on, we will do this inside a very simple html page. The bare minimum.

To write html, we need an editor of some sort and that editor needs to be capable of producing a pure ascii text file. You could also use a generator (frontpage, dreamweaver, coffee cup visual site, etc) or similar program that can export html (word, etc) but for right now, it is best to stick with just a simple editor.

Notepad works fine for this, but there are also plenty of good editors around that won't jumble up your code on you. My current favorite is pspad http://www.pspad.com/ . I like it because, first of all, it has editing capabilities for all sorts of files built in. 2. It does a certain amount of syntax checking, 3. It has a lot of great built in functions (search and replace across entire fioles) and 4. Becauswe it has a great little tool to expand or compress html code, this feature alone is worth the price !!! (free btw..lol)

Open an editor and get to a new blank file.

Code the structure for a BASIC html page (just the minimum required).

<html>
<head>
</head>
<body>

</body>
</html>

and save the file as "ssi_include.shtml'

Now, hit "save as" from the file menu and save the file a second time as "php_include.php"

Now, hit "save as" from the file menu and save the file a third time as "php_parse.php"

We now have 3 test files created to work with so we can see how all this stuff works.

Open the ss1_include.shtml file

in between the body tags:

<!--#include file="your_template_folder/your_template_filename" -->

where tour_template_folder is the template folder you created on your server and your_template_filename is the name of the file you told your template in RT to create.

save this file.


Open the php_include.php file

in between the body tags:

<?php @include("your_template_folder/your_template_filename"); ?>

where tour_template_folder is the template folder you created on your server and your_template_filename is the name of the file you told your template in RT to create.

save this file.


Open the php_parse.php file

in between the body tags:

<?php

$filename = "your_template_folder/your_template_filename";

if (file_exists($filename)) {
$fd = fopen ($filename, "r");
while (!feof ($fd)) {
$buffer = fgets($fd);
echo $buffer;
}
fclose ($fd);
}
else
{
echo "Could not find " . $filename;
}


?>

where tour_template_folder is the template folder you created on your server and your_template_filename is the name of the file you told your template in RT to create.

save this file.


Now we need to put these files on the server and check some things out.

We need to know whether SSI is enabled on our server and whether php is running on our server. We will test these files and possibly get our information from the test. If we can't determine it by the test, then we need to go back to our hosts and find out what we need to do.

Put the files on the server, oppen a browser and type in the address for the ssi_include file. ie: http://www.yourdomain.com/ssi_include.shtml

If ssi is enabled on your server and if your host designates that .shtml files are ssi enabled files then we should see the table that remotethumbs produced for us. If we do not see the table, then either ssi is not enabled or .shtml is not the extension that your host designated for ssi enabled files.

Now try the php include the same way. ie: http://www.yourdomain.com/php_include.php

If you do not see your table and do not see an error message then either php is not turned on on your server or your host expects some other extension other than .php for php files.

Now try the php parse the same way. ie: http://www.yourdomain.com/php_parse.php

And again, you should see your table or a message indicating that the file could not be found.

If either the ssi or php versions produced nothing (no output, no errors) then you need to go visit with your host (or your host's faq/tech support section) and determine what you have to do to run an ssi file or a php file on your server.

Working examples:

http://www.sexeducatoon.com/ssi_include.shtml
http://www.sexeducatoon.com/php_include.php
http://www.sexeducatoon.com/php_parse.php

I you noticed. In the two places we used an "include" file, right where we put the include line was where the remot thumbs file was inserted. That is the way an include file works. Whether it is an ssi include, a php include or an asp include, where it is called is where it appears in the code.

Now, the php_parse also appeared where we put it, but if the script could not find the template file it instead showed a message that the file could not be found.

The advantage of parsing the file through a script instead of a simple include statement is that you can apply logic to your output. In this case the logic is "If you can find the file show it otherwise show an error message". This is something you cannot pull off in a straight html page or a straight include statement.

Because I truly believe that a webmaster should never run code (html, style, or program code) that they do not understand 100% I am going to run through the parse routine step by step and explain what we are doing:


<?php

All php programs start with <?php and end with ?>
That tells the program where to start translating the php statements and where to stop translating them.

$filename = "your_template_folder/your_template_filename";

$filename is a variable name, a storage area on the server to store a piece of data. In php, pretty much all variable names start with a dollar sign ($)

By stating that $filename= we are placing whatever is on the right hand side of the equal sign into the storage area that we called $filename. In this case, we are storing a set of character data (called a string). We designate that it is character data by using quotes at the beginning and end of the string.

The semi colon at the end of the line tells php that that is the end of the statement.

if (file_exists($filename)) {

The if statement is the only true logic in a program. It is the decision maker. it is structured as:

If (condition) {do this }

The "condition" is something that returns either a true or false.
The { starts the block to be performed if condition is true and the } states that the block ends. Inside the block we can run whatever code we see as necessary.

So, in this case our condition is (file_exists($filename)) . The file_exists looks for a file by the name passed to it (in this case whatever we have stored in $filename) and returns a true if itr is found and a false if it is not found.

If the file we are looking for is there, we are returned a "true" and we start processing the commands inside our block (inside the { and })

$fd = fopen ($filename, "r");

We create a variable called $fd and store into it the results of an fopen command.

The fopen command tries to open a file. If it opens it succesfully then it returns a "file handle" (basically a channel between the program and the file that was opened) The fopen uses 2 pieces of data that are passed into it:

fopen(filename, rights) where filename is the name of the file to open and rights define the permissions that the file is opened with. In this case we are passing in an "r" as the rights. This tells fopen to open the file with "read only" permission.

while (!feof ($fd)) {

The while command starts and then processes a "loop". A loop is a set of statements that are processed over and over (repetitive) with usually some kind of control to tell the program when to stop repeating.

while (condition) { do this..... }

The condition, just like the condition in the "if" statement returns either a "true" or a "false" . In this case, our condition is (!feof($fd))

The "!" means NOT. the "feof" means end of file and the ($fd) is the file channel we opened with our fopen.

So the entire statement can be read as : do this while we have not reached the end of file mark of our input file.

$buffer = fgets($fd);

This creates a variable called $buffer and stores into it whatever the "fgets" statement pulls from the file we have open.

The fgets grabs the next bunch of characters up until it hits an "end of line" mark of some sort.

echo $buffer;

Echo tells the program to write whatever is in $buffer to the browser (standard output)

}

This closes our while loop

fclose ($fd);

fclose closes our input file

}

this closes our "if" statement

else

The else clause of the "if" statement tells the program to run alternate code if the condition inside the if statement returns false.

{

This starts the block to be performed in the else sequence

echo "Could not find " . $filename;

This prints to the browser a message saying "Could not find " with the filename we wanted at the end.

the "." operator in php is the "string concatenation" operator. Which mens simply, "slap those two strings together alongside each other".

ie: If I wrote something like echo "FOO" . "BAR"; I would expect to see FOOBAR as the output.

}

This closes the else clause

?>

This tells the server to stop processing php directives.

Let's talk about html a little bit.

HTML - Hyper Text Markup Language

WW3 Consortium ) - controls HTML standards
Breakdown of the various html statements and parts
Beginners guide to HTML

HTML is a document language, not a programming language. It exists to provide a standard for presentation of documents.

An HTML document consists of 3 main parts:

1. The document itself (begins with <html> ends with </html>)
2. The head of the document (begins with <head> ends with </head>)
3. The body of the document (begins with <body> ends with </body>)

So, whenever we are writing html we start at the top of a text document with a <html> tag.

The head section describes the document. Within the head section are various directives that you can pass to a browser to tell it what the document is.

The first tag I usually use in the head section is the title tag:

<title>Title of the site</title>

Most browsers pick up the title tag and display it at the top of the browser window.

Most of your other tags in the head section are META tags. META tags are not displayed by the browser, they pass information to "non humans" ie; browsers, search engines, the like.

The two META tags I always use are the description tag and the keywords tag.

<META name="description" content="Whatever description you want spiders to pick up.">
<META name="keywords" content="whatever keywords you want spiders to associate with your site">

The body of the document is the part that is displayed in the browser. This is where all the cool stuff happens


So, our nest step is to "tag up" some of the code we created earlier.

Let's use the ssi_include file we created earlier as our working file.

In your editor open up the ssi_include.shtml file.

In between the open and close head tags

<title>Whatever you want to call your site</title>
<meta name="description" content="Whatever description you want the spiders to associate with your site">
<meta name="keywords" content="Whatever keywords/phrases you want the spiders to associate with your site, separated by commas">

Now, a general rule I follow is to make sure that my title, description or keywords do not go beyond 254 characters in length. I don't know if this is a diehard rule or not, but it has always worked for me.

Another general rule I follow is to make sure that whatever keywords I feature in the keywords meta tag also appear somewhere in the body of my text and that I don't repeat keywords anywhere in the keywords tag more than 3 times to avoid looking too spammy to a spider. (SEO guys will know these rules a whole lot better than me)

I also make sure to get my most important keywords up into my description.

ie:

<html>
<head>
<title>The best fucking TGP you ever saw</title>
<meta name="description" content="Adult Content - The best fucking tgp you ever saw features daily free porn nude pictures and movies of the hottest babes sucking and fucking other foxes and hunks">
<meta name="keywords" content="TGP, Babes, Hunk, Foxes, Nude, porn, fucking, Best TGP, pictures, movies">
</head>


There are many other meta tags that can and should be used in a document. I would consider these to be the minimum for anything you want a spider to search.

a nice little meta tag introduction is at http://searchenginewatch.com/webmas...cle.php/2167931

The body of the html document

Between the body tags of the html document is where all the action is. The body is comprised of various "tags" and text. The tags control the appearance of the document and can call various "objects" into the document.

Each tag may have certain "properties" that can be controlled within the tag itself.

There are many different tags and properties that can be used and I am certainly not going to even try to go through all of them here.

Some tags can be browser specific, less so now than a couple of years ago, but you still may come across a tag that acts one way in IE and another way in Netscape or Firefox or that is ignored completely by certain browsers.

some guides: HTML 4.0 Tags
A list of HTML tags
An HTML Tags chart - watch the fucking popup in front
Barebones guide - tags by functionality

We will be doing a very simple page at first just to get used to the tags and such.

Once again, download and open your ssi_include version that you created and should now have keyworded and titled.

Right after the <body> tag

<center>
<h1>
Website Title
</h1>
<h2>
Here are today's galleries:
</h2>
</center>

Then make sure your include file line is here

Then we should have the close body and close html tags:
</body>
</html>

Save the file, upload it and then take a look at it in the browser.

example: http://www.sexeducatoon.com/ssi_include1.shtml

Ok, now, what did we tell it to do:

<center>
This tells the browser to put anything between this and the close center tag into the center of the browser window.

<h1>
This tells the browser to put the text that follow in headline format at the biggest size (could be anywhere from H1 to H6 with 1 being the biggest)

</h1>

This closes the H1 tag - tells the browser to stop headline size 1 right here

<h2>
This tells the browser to put the text that follow in headline format at the next biggest size.

</h2>
This closes the H2 tag - tells the browser to stop headline size 2 right here

</center>
This closes the center tag - tells the browser to stop centering stuff right here.

If you do a "View source" of your webpage (yes, it is now a webpage) yopu will see some additional code. This code is what was pulled in from the remote thumbs file.

So, now we have a very basic tgp webpage built.

Now we have to go turn it on in remotethumbs.

Go back to remotethumbs.
Go to My Templates
on the right hand side of the screen on the same line as your yemplate, you will see a link to "switch online", click it.

Now your gallery updates are live. Every day at what ever time you told it to, remotethumbs will automatically update the template file on your server.

Because we use an include to pull the file in, the page will automatically pull in the most current file.

Voila, auto updating TGP page.

So, I guess we're done...........

Just kidding

Now we need to go make this a website. We need to make the page a better looking page, add some color, some sponsor links, some banners, ads all the cool stuff.

Step 4 - Orginal thread: http://www.oprano.com/msgboard/showthread.php?t=43050

Spiffy text and a site "personality."

Your site "personality" will depend on site title, any logo you may be using and the sponsors you decide to push.

My site is "Morgan's TGP." The "personality" is the side of "Morgan" that I elect to bring to this specific table combined with my preference for shoving Adult Date Link at my surfers. (Why? Because it farging *converts,* that's why!)

I'll help with anyone who needs assistance with spiffy text.

Remember, all participants in the project get a story packet, so hit me up and I'll get one to you when you want it!

To read more from this article, please follow this link: http://www.oprano.com/msgboard/showthread.php?t=43610

 

Pearls | Morons | Archive | Oprano