dyknight
Jun 30 2006, 12:59 PM
Good morning everyone. Have you ever wondered how to allow your visitors to edit content on your blog? Like adding a post straight off the page, adding a link, editing your profile etc. This will be extremely useful if you want your visitors to contribute to your blog besides writing comments or tagging. 1. Adding a post straight off the page. Go to blogger.com, login, select your blog. Go to settings -> email. By enabling blog email, you can now add a post by simply sending an email to the address you specified. The address should look something like: yourusername.secretpass@blogger.com Now open up a text editor, and paste this code (note the italics): CODE <?php
/******************************************* This script sends an email to Blogger to post on blogspot.com Called by: form on blogspot.com *********************************************/
$subject = $_POST["subject"]; $headers = $_POST["author"]; $message = $_POST["message"]." ".$headers; $email = "[i]enter your blogger email here. make sure it is in the inverted commas[/i]"; mail($email,$subject,$message); header ("location: [i]enter your blogspot address here. make sure you add http:// before the address[/i]"); ?>
Save the above file as a php file. Upload the php file on a server that supports php, such as trap17 dot net. Go to blogger templates, and paste the following code (note the italics) where you want the form to appear: CODE <form action="[i]enter your php script URL here[/i]" method="post" name="post"> <table> <tr> <td><label>Author</label></td> <td><input type="text" name="author" /></td> </tr> <tr> <td><label>Subject</label></td>
<td><input type="text" name="subject" /></td> </tr> <tr> <td><label>Post</label></td> <td><textarea name="message"></textarea></td> </tr> <tr> <td><input type="submit" value="Post!" /></td>
</tr> </table> </form>
Tada! Now your visitors can use the form to add a post. The form wil call your php script, which will send an email to blogger and redirect back to your page. 2. Changing content. For this tutorial, I will use "Links" as an example. The script will let user add links to your 'links' section. Go to blogger template and paste the following code to create a links section. Do not put anything inside the div: CODE <div id="links></div>
Now open up a text editor and paste the following (note the italics): CODE <?php /********************************************* This script appends to the javascript links.js Called by: form on blogspot.com Calls: links.js *********************************************/
//open file $quotefile = fopen ("links.js",a); flock ($quotefile,LOCK_EX);
//get contents $time = "<h3>".$_POST["time"]."<br>"; $title = $_POST["title"]."</h3>";
$quote = str_replace (" ","<br>",$_POST["quote"])."<br>";
$msg = "quotes = quotes + \"".$time.$title.$quote."\";";
//write fwrite ($quotefile, $msg);
//close flock ($quotefile, LOCK_UN); fclose ($quotefile);
header("location: [i]enter your page address here. don't forget the http://[/i]");
?>
Save as a php file. Next use the text editor again to create a file: CODE // JavaScript Document
var quotes = "[i]enter your formatting here. e.g. <h1>links</h1>[/i]";
Save as links.js. Upload both files to your server. Go to blogger template, add the following at the top of the script, within the head tag: CODE <script type="text/javascript" src="[i]enter the address of links.js. Make sure you have the http://[/i]"> </script>
Add this to the body: CODE <form action="[i]enter the address of your php script. Make sure you have the http://[/i]" method="post" name="post"> <table> <tr> <td><label>Date/Time</label></td>
<td><input type="text" name="time" /></td> </tr> <tr> <td><label>Title</label></td> <td><input type="text" name="title" /></td> </tr> <tr> <td><label>Quote</label></td>
<td><textarea name="quote"></textarea></td> </tr> <tr> <td><input type="submit" value="Add!" /></td> </tr> </table> </form>
Now, go to the end of the html, and add this before closing the body tag: CODE <script language="javascript" type="text/javascript"> //print quotes var printTo = document.getElementById('links'); printTo.innerHTML = quotes; </script>
And you are done. The form will call for the php script, which will append to links.js. The html will load links.js and the variable quotes. The last script in the html will get the div "links" and write the contents of the string quotes to the innerHTML.
Reply
Trair
Jul 2 2006, 04:29 AM
Very nice! I myself don't have a use for it, but I'm sure somebody does...
Reply
michaelper22
Oct 6 2006, 05:50 PM
That is a nice tutorial. Visitor interaction is relatively important these days. But realize that spammers can take advantage of this, since you are leaving an email form out in the open for them to use.
Reply
jlhaslip
Oct 6 2006, 06:31 PM
MH is right. Might be as simple as wrapping the $_POST variables in a trim() and stripslashes(). Possibly an htmlentities(), too?
Reply
styfer
Dec 12 2006, 01:17 PM
thanks for the info! but can anyone list out if there are any dangers involved the part that involves 'yourusername.secretpass@blogger.com' will anyone be able to see it with the code u wrote?
Reply
Sprnknwn
Dec 12 2006, 03:30 PM
Oh, interesting. I didn´t know you could do this in a site like blogger, so pre-established. I have a blogger account there doing nothing really... maybe someday i will try this to see how it works, although I´m afraid that this will be very easy for spammers to fill your site with their messages.
Reply
Similar Topics
Keywords : making dynamic blogspot external server pages hosted blogspot dynamic- How To Make Your Own Counter Strike Source Dedicated Server!
- (2)
Ok, so you want to host your own CSS Server on your computer eh? Well you will not need a lot of
things, and it is very simple. All you will need is time. /biggrin.gif"
style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> I did this tutorial
myself, from my experience when I made my own CSS Server. This is just a simple tutorial! It
ONLY covers the basics of making a CSS server! Lets Get Started! /laugh.gif"
style="vertical-align:middle" emoid=":lol:" border="0" alt="laugh.gif" /> 1. Download the HLDS
Update Tool from here . 2. On...
Making Calculators with PHP
- Some basic calculator scripts I made. (4)
Simple Javascript And Password System
- How to protect your pages with password (6)
The quickest way to get a password protection system up and running is to use a Prompt box in
JavaScript that has a title like "Enter your Email Address". Only you and the relevant users know
what the password should be, could even be one each, that can be sorted out at the next page then
pass the "input" directly through the url by changing the .href, like
http://www.iSource.net.nz/users/?leTmeIn= The page that then processes this should also check for
the referring page, and three fails from an IP if you like the php (the next page): CODE
<?php // processdo...
Making Winrar Archives
- and adding password to winrar archives (12)
**** This tutorial will show you how to put files into .rar Archive and pass worded (if wanted)
**** What You Will Need Before continuing you will need a couple of thing, first of all you
need WINRAR , which is a very powerful archive manager. It can reduce size for you email
attachments, decompress RAR, ZIP and other types of files downloaded from the internet. You can get
winrar at http://www.rarlabs.com The other thing is that make sure your using Windows XP because
this is what I used to make this tutorial. I think it works with any other windows not...
Test Your Php Pages W/o Upload/internet
- complete *working* guide on how to test your php pages (57)
In this tutorial, I'm going to show you how to test your PHP pages without the Internet or
uploading the files to your trap17 server. This tutorial is similar to doom's, but the links he
provided does not work, so I decided to make my own tutorial with working links. The program that I
will be using for this tutorial is called XAMPP . XAMPP is a modification of the popular Apache
server, and I'm using XAMPP because of its simplicity to install as well as maintain. The
current version of XAMPP is 1.4.13 and it has the following bundled in the download: QUOT...
How To Make An Ultimate Game List.
- If you're making a site on video games or such. (0)
Hello. I am BuBBaG. You can call me Bubba for short. I'm going to show you how to make an
Ultimate Game List. First off, we need to make a database, we are going to call this database
`my_db`, leave out the `'s. Inside that database we will need to create a table
called `ugl'(Ultimate Game List, duh). To make the table, simply enter this in the Syntax.
CODE CREATE TABLE ugl ( System char(50), Game char(50), ) In the
above code, it is stating we are creating a table called ugl, with two columns, System, and Gam...
How To: Make A Simple Php Site
- Making one file show up on all pages using php (21)
I have looked all over the site and could not find anything that was like this simple, or just like
this at all.. For some people i know that you are using a basic HTML site...and having a big menu
if you want to add somthing you have to go into every one of the pages and add or remove or edit
what you want to do, but with somthing verry simple all you would have to do is edit one file, and
all of the pages that have the PHP script on them would suddenly change to what that one file is.
So to start off if you are planning on using this little tirck, the page that you a...
Css And Javascript Combined For Dynamic Layout
- use of different CSS files at same site (9)
This tutorial is meant for people that are dealing with problems while coding their site at 100% of
width. Important notice: Some people has JavaScript disabled, so they will not be able to load CSS
file (take this in account when creating your website). How this script works. In the HEAD of your
HTML document will apply this command, so variable.js file will be load at start: CODE
<script type="text/javascript" src="variable.js"></script> In
browser JavaScript file variable.js is loaded. This Javascript file consist of this para...
Tutorial: Installing D-shoutbox For Ipb V1.2
- Making your installation even easier (12)
Over the course of the summer I have tried hard to install a shoutbox into a new forum I was
developing. I went to the Invisionalize forums and found several mods for shoutboxes, but none of
them seemed to work. I first tried to install the D-Shoutbox, but upon this first try, I was
unsuccessful. Eventually, after much frustration, and trying other mods, which didn't seem to
stack up to Dean's features, I was determined to make it work. For some, editing your files (to
the newbie that is) can be difficult, with everything looking like a foreign language (basi...
Making Interactive Cds With Flash
- My second flash tutorial for Beginners (2)
Im back again with what i think it would be an interesting tutorial for all of you guys who wants to
take flash out of the web and make really cool interactive CDS. First of all if all of you are
thinking right now: "this dude is wrong for making interactive cds you have to use macromedia
Director", well you are right macromedia director it's used to build interactive cds and dvds
among other things, but you can also make interactive cds with Flash, the thing is: if you want to
make a simple interactive CD you can totally do it with flash, of course Director brings ...
Php--> Content-only Pages
- Create easy to edit php pages. (9)
Description Learn to create easy to edit content-only pages with php. By parsing your layout into
your pages, you can reduce file sizes and files will become much neater. Try it out Ok, lets
start by creating a file called template.php. CODE <?php
//--------------------------------- //Layout top section //---------------------------------
$top = <<< html <!-- include HTML header code here --> <body>
INSERT CODE FOR [b]TOP[/b] OF LAYOUT HERE. html;
//--------------------------------- //Layout bottom sec...
Ftp In Visual Basic 6.0
- Start making your FTP client using VB6 (0)
Recently, I had a need to make a FTP client, since our webhosting FTP server was kind of exotic, and
very restrictive, and most of uploads, even though they reach 100% would crash... File would be
uploaded to a server, but FTP clients just froze upon completion, waiting for the 226 (OK) from FTP
server... So, I had to make my own, one who would not wait for 226, but instead, watch the file
pload progress... This tutorial is not fuly complete, in the sense that it does not offer COMPLETE
FTP client functionality (for example, I ddn't write the code for FTP download, ...
Server Status
- MAke Your own server status in PHP (12)
My Friend and i made an mmorpg we decided to make a code so the users could tell when the game
server was running this codoe has many other uses to like monitor a website or w/e you want to do.
CODE <? $ip = "youriphere"; $port = "yourporthere"; if
(! $sock = @fsockopen($ip, $port, $num, $error, 5))
echo '<B><FONT COLOR=red>Offline</b></FONT>'; else{ echo
'<B><FONT COLOR=lime>Online</b></FONT>'; fclose(...
Changing A Dynamic Ip
- How to change your dynamic IP. (18)
In this tutorial I will tell you how to change a dynamic IP if you have Windows XP. First of all go
to - Start >> Run - and type 'cmd'. A window with a black background and grey text. In
this window type 'ipconfig' and text should come up saying: IP Address ............. *IP
HERE* Subnet Mask ................ *SUBNET MASK HERE* Default Gateway .......... *DEFAULT GATEWAY*
Write this down on a bit of paper on in notepad. You will need them later. Now type
'ipconfig/release' - this will terminate your internet connection - but don't g...
Custom 404 Error Pages
- A Tutorial On How To Make Custom 404 Error Pages (17)
I've seen a tutorial on here and no offense but it was horrific, this is the real way you do a
404 Error Page. Make a file called: htaccess.txt Open it up and put this: CODE ErrorDocument
404 /myerrorpage.html You will need to change myerrorpage.html to whatever your page is called.
Also when you upload this file to your server you need to rename it to: .htaccess Yes, the dot is
before the words. You need to do this on the server because on Windows you cannot do that!...
Making A Song In Fruity Loops Part Three
- part three precusion (0)
ok part three now which covers the precusions setup of the small song i built for this tutorial.
the nesecery files can be downloaded here the image below is included in the precusions folder as
it mught not be entierly visable within this post so shold you need it its there also the images
purpose is to enable you to see what i am refering to within this tutorial lateron. now what i
have done above is blackd out every pattern that has nothing to do with the precusion. so the
patterns displayed in light grey are the only patterns i will be refering to. ok lets b...
Making A Song In Fruity Loops Part 2
- part 2 the second melody (0)
ok i am going to attach the midi file againe incase you didnt get it from the first part in this
part i will demonstright how to create and insert the second mellody ok so you have your first
mellody wich is ecetially the comein chord as i call it. now open the midi file you put in your left
panel during the first tutorial and drag the mellody 2 © onto the pallet but click on pattern two
in the right site playlist box. now like in the first tutorial replace with sytrus. for this type
of mellody use something in the leads section of the plugin.for this you need to ...
How To Create Counter-strike 1.6 Server In Console Mode
- (5)
Hello! Now I will show you how to create a CS 1.6 Dedicated server /smile.gif"
style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> 1. Locate HLDS.exe. It
could start it from Steam. 2. Make a batch file. You could name it how you like, I writed it as
start.bat. It should be located in the same folder as the HLDS.exe. It should contain something like
this: CODE HLDS.EXE -console -game cstrike -port 27015 +maxplayers 24 +map bl_counterquake
+sv_lan 0 +rcon_password yourrconpass -secure I recommend -console to be there, couse it starts
hld...
Creating A Resume
- 10 Tips For Making A Resume (1)
I've been working on my Resume for months now. Here is a summary of what I've learned: 1.
Avoid referring to yourself via 1st person or 3rd person terms. Rather than saying "I started this
job in" just say "Began job in"... Employers expect Resumes to be professional and avoid reference
to oneself; and instead speaking in an impersonal tone that presents
achievements/skills/experience/education without personalization. Avoid words like "I", "my", "he",
"she", etc. Leave out personal pronouns and only use the action words/verbs. This also includes
your Ob...
Dynamic Signature - Yet Another Way To Do It
- Create dynamic sigs for multiple users using .htaccess and RewriteRule (0)
Ever since I connected a program I made in Visual Basic to MySQL database, I had an idea to create
some sort of a status page... And I did that, where I updated my connection status every 60 seconds,
updated my Winamp playlist, and several other interesting things... Then, I figured I could create
an image, and display all that info, and show it on forums, as a signature... And I made a great
PHP script, that look real fancy, and does the job perfectly... So, I was adding the reference to
http://status.galahad.trap17.com/stat.php to all the forums... BUT (there's ...
Making A One Page Does All Website In Phph
- (2)
Hello and Great Day or Night either one. Have you ever been to a site and seen a index page or any
page at all control everything such as index.php?do=home&action=logout something similar to the
above? Well I am going to show you how easy it is to make this all own your own, and only have to
use one web template or design to make it work. Before we get started you need to go ahead and find
the web design that you want to use. After you find the site you want to use go ahead and save
it... and save it like this so we can work together, ok! Note* We are going to ...
Making a java based program
- (3)
Java GUI Making a Little Java Program Sec. 1: Imports and starting it off Sec. 2: Variables Sec.
3: Frame and Stuff Sec. 4: Declaring buttons Sec. 5: Adding buttons Sec. 6: Action Listening Sec. 7:
Using this for a learning experience Section 1 Now, let's think. What imports do we need? We
obviously need GUI imports. We also need the action Listener. So, let's declare this at the very
top: Code: CODE import java.awt.*; import java.awt.event.*; import javax.swing.*; That's
all we need to get all our supplies. Now to start us off. Skip a couple lines ...
Making The Popular Id Browsing For Your Site.
- (17)
Was just sitting and being bored but then I realized I could show how to create more or less popular
?id=page browsing. It's actually really easy. I know two ways how to do it. First one I learned
was checking the variable and if it's true including the text/file/anything needed and so on. It
was ok, but sometimes I just couldn't make it work so I switched to switch() function and
that's what I'm going to show you guys right now. So, I made a test page which contains the
code needed and here is its source. CODE <!DOCTYPE HTML PUBLIC ...
Templating System Using Php Includes
- Building a Dynamic site using Includes and flat-files. (13)
Php based Templating System http://jlhaslip.trap17.com/template/index.php The Source Code
for the scripts are included (literally) on the different pages on the Demo, including the Contact /
Email script. The only page not there yet is the Message Script. Maybe tonight I will upload that.
This one uses a little bit of query-string checking to confirm that the contents of the page are
actually available (file_exists())and an allowed page content before serving it up. The
'allowed page content' is done by checking against a flat-file containing an array...
Do You Want To Use Php Code In Your Html Pages?
- Within two minutes you will! (9)
Whilst searching around for help to setup cutenews blog I came across a way to use php in html pages
- lo and behold it works! so I thought I'd share it with you all (Unfortunately I can't
remember the site so I wrote this up a couple of minutes after I did it:) ). This method requires a
web server with apache installed. So, luckily for us all this covers the whole of Trap17... even
Qupis /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> Just
to make the point, this is in no way a difficult task and it doesn't requir...
Dynamic Signatures - The Real Way To Go
- Forget placing index.php in a signature.png folder. (8)
This is only a very quick tutorial, meant to complement the dynamic signature tutorials that already
exist here. It's nothing new, but it was just brought to my attention that not many people seem
to be aware of this method. This does not cover the actual creation of dynamic signatures, per se -
but rather a better 'trick' to allow you to use dynamic signatures on forums such as this
one. I've noticed that most of the dynamic signature tutorials on this forum state that you
must place a file index.php in a folder .png, in order to trick Invision Power...
Document Type Declarations
- And why we use them in html pages (0)
This code: CODE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> <html> <head>
<title>HTML 4.0 Strict document</title> <meta
http-equiv="content-type" content="text/html;charset=utf-8" > <meta
http-equiv="Content-Style-Type" content="text/css" > </head>
<body> <p>... Your HTML content here ...</p> <p>... More
HTML content here ...</p> </b...
Starting Or Stopping Apache And Mysql Server Via Batch File
- (0)
Hi guys, this is a litte tutorial about how we start and stop the Apache and MySQL in Windows NT
(2000, XP, 2003) via a batch file script. As we know in Windows NT based system Apache and MySQL
installed as Windows Services. So we can stop and start it using NET command. For more information
about DOS command, type HELP at command prompt. I assuming that your MySQL service name is "mysql"
and your Apache (Apache 2.0.x) service name is "apache2". If you want to chek it click Start > Run >
services.msc > OK. Windows IS NOT Case Sensitive. Let's get started!. 1. ...
Checking For Open Ports From Php
- If you want to check the status of a server at a specific port you can (3)
Some days ago, i needed to check ports of a server from a webpage, for advising of its status. I
simply used a great php code that's fsockopen . I'll explain it in the following example:
(Imagine a file called 'checkports.php', containing the next) CODE <? $address
=" trap17.com"; //Here you can specify the address you want to check ports $port =
"80"; //Here you can specify the port you want to check from $address $checkport =
fsockopen($address, $port, $errnum, $errstr, 2); //The ...
Php Dynamic Signatures
- Using the GD Module and MySQL (9)
PHP Dynamic Signatures using the GD Module After much scowering on the internet to find a
suitable tutorial on this subject, I came up empty-handed. So I was forced to learn it on my own
through trial & error. And since I had discovered a lack of tutorials on this subject, I dediced to
write one! Working Example: Abstract : Using the GD Module of PHP allows a
developer to build custom Images with Dynamic Content. Such content could be the Requesting Users
IP Address, Web-Browser Type, Operating System, even the number of times the user has see...
Looking for making, dynamic, page, blogspot, external, server, make, pages, hosted, blogspot, dynamic
|
|
Searching Video's for making, dynamic, page, blogspot, external, server, make, pages, hosted, blogspot, dynamic
|
advertisement
|
|