Installation instructions for 'Text Box MOD' Version 1.0.2
(Updated for Pixelpost version 1.5 RC1)
About this MOD:
Title:
Text Box MOD
Description:
Adds a new form field in new_image.php allowing you to enter the photographs location at time of upload.
You can also edit and add locations to previous photographs via images_edit.php
Version:
1.0.2
Installation Level:
Moderate
Installation Time:
20 minutes
Author
Username:
dwilkinsjr
Realname:
David Wilkins Jr
WWW:
http://dwilkinsjr.com
Files To Edit:- index.php,
- admin/images_edit.php,
- admin/new_image.php,
- language/admin-lang-english.php,
- language/lang-english.php
Included Files:Disclaimer:
!!!!INSTALL AT YOUR OWN RISK!!!!
FYI, Downloading this MOD from other sites could cause malicious code to enter into your pixelpost installation.
Author Notes:
This MOD is copyright 2005-2006 David Wilkins, All Rights Reserved
Be sure to edit all templates you have loaded.
Do not save any file until all procedures have been completed.
Once all the below modifications have been completed and saved,
open the included install.php which should have been coppied to your pixelpost directory and
follow the instructions within.
MOD History:
2006-02-24 - Version 1.0.02006-02-11 - Version 1.0.1- Added more language file support.
2006-04-23 - Version 1.0.2- Updated to work with pixelpost 1.5 RC1
Other Notes:
Before attempting this MOD to your Pixelpost instalation, You should back up all files related to this MOD.
This MOD was designed for Pixelpost 1.5 RC1 and may not function as stated on other Pixelpost versions.
File Copy:
Copy: install.php
To: pixelpost_root/install.php
Edits:
These are manual instructions that cannot be performed automatically. You should follow these instructions carefully.
Open: index.php
Find:
PHP Code:
$image_title = htmlspecialchars($image_title,ENT_QUOTES);
Add after:
PHP Code:
$image_location = $lang_location . pullout($row['location']);
Find:
PHP Code:
$tpl = ereg_replace("<IMAGE_TITLE>",$image_title,$tpl);
Add after:
PHP Code:
$tpl = ereg_replace("<IMAGE_LOCATION>",$image_location,$tpl);
Open: admin/images_edit.php
Find:
PHP Code:
$headline = clean($_POST['headline']);
Add after:
PHP Code:
$location = clean($_POST['location']);
Find:
PHP Code:
$query = "update ".$pixelpost_db_prefix."pixelpost set datetime='$newdatetime', headline='$headline', body='$body', category='$category' where id='$getid'";
In-line Find:
PHP Code:
headline='$headline',
In-line Add after:
PHP Code:
location='$location',
Find:
PHP Code:
while(list($id,$datetime,$headline,$body,$image,$category) = mysql_fetch_row($images)) {
In-line Find:
In-line Add after:
Find:
PHP Code:
# $headline = htmlentities($headline);
Add after:
PHP Code:
$location = pullout($location);
Find:
PHP Code:
#$id, $admin_lang_imgedit_title $headline,
Add after:
PHP Code:
$admin_lang_imgedit_location $location,
Find:
PHP Code:
$headline = htmlspecialchars($headline,ENT_QUOTES);
Add after:
PHP Code:
$location = pullout($imagerow['location']);
Find:
HTML Code:
<div class='jcaption'>$admin_lang_imgedit_title</div>
<div class='content'>
<input type='text' name='headline' value='$headline' style='width:300px;' />
</div>
Add after:
HTML Code:
<div class='jcaption'>$admin_lang_imgedit_location</div>
<div class='content'>
<input type='text' name='location' value='$location' style='width:272px;' />
</div>
Open: admin/new_image.php
Find:
HTML Code:
<input type="text" name="headline" style="width:450px;" /><p />
Add after:
HTML Code:
<?php echo $admin_lang_ni_image_location; ?>
<input type="text" name="location" style="width:428px;" /><p />
Find:
PHP Code:
$headline = clean($_POST['headline']);
Add after:
PHP Code:
$location = clean($_POST['location']);
Find:
PHP Code:
$query = "insert into ".$pixelpost_db_prefix."pixelpost(datetime,headline,body,image)
In-line Find:
In-line Add after:
Find:
PHP Code:
VALUES('$datetime','$headline','$body','$image')";
In-line Find:
In-line Add after:
Open: language/admin-lang-english.php
Find:
PHP Code:
$admin_lang_ni_image_title = "Image Title";
Add after:
PHP Code:
$admin_lang_ni_image_location = "Image Location";
Find:
PHP Code:
$admin_lang_imgedit_title = "Title:";
Add after:
PHP Code:
$admin_lang_imgedit_location = "Location:";
Open: language/lang-english.php
Find:
PHP Code:
$lang_message_banned_comment = "Your comment hasn't been saved! It contains one or more banned words/email/ips.";
Add after:
PHP Code:
// Extra Information
$lang_location = "Location: ";
Additional Notes:
All my "hacks" follow phpBB forum MOD guidelines. If you need more guidance in following this hack, please check out phpBB's article on
How to install a MOD. Please note that this article should be used as a guideline as to what each "command" means. e.g.- If you don't know what the following means; Find, After Add, In-line Find, In-line After add, etc. The above referenced link will explain it to you.
Also, I have created a online version coded in XML. It is much easier to follow but you will need an XML viewer to see the file. I testing it out using the latest versions of Apple Safari and Firefox on my MAC and all looked well. However, I was not able to test it on a Microsoft Windows machine using its supported browsers.
'Text Box MOD' Version 1.0.2 MODX.xml
Download Installer File
(Installer file is needed to make the necessary changes to your database)