Dkozikowski
04-23-2006, 10:23 AM
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:
install.php
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.0
First release.
2006-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:
$image_title = htmlspecialchars($image_title,ENT_QUOTES);
Add after:
$image_location = $lang_location . pullout($row['location']);
Find:
$tpl = ereg_replace("<IMAGE_TITLE>",$image_title,$tpl);
Add after:
$tpl = ereg_replace("<IMAGE_LOCATION>",$image_location,$tpl);
Open: admin/images_edit.php
Find:
$headline = clean($_POST['headline']);
Add after:
$location = clean($_POST['location']);
Find:
$query = "update ".$pixelpost_db_prefix."pixelpost set datetime='$newdatetime', headline='$headline', body='$body', category='$category' where id='$getid'";
In-line Find:
headline='$headline',
In-line Add after:
location='$location',
Find:
while(list($id,$datetime,$headline,$body,$image,$c ategory) = mysql_fetch_row($images)) {
In-line Find:
$headline,
In-line Add after:
$location,
Find:
# $headline = htmlentities($headline);
Add after:
$location = pullout($location);
Find:
#$id, $admin_lang_imgedit_title $headline,
Add after:
$admin_lang_imgedit_location $location,
Find:
$headline = htmlspecialchars($headline,ENT_QUOTES);
Add after:
$location = pullout($imagerow['location']);
Find:
<div class='jcaption'>$admin_lang_imgedit_title</div>
<div class='content'>
<input type='text' name='headline' value='$headline' style='width:300px;' />
</div>
Add after:
<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:
<input type="text" name="headline" style="width:450px;" /><p />
Add after:
<?php echo $admin_lang_ni_image_location; ?>
<input type="text" name="location" style="width:428px;" /><p />
Find:
$headline = clean($_POST['headline']);
Add after:
$location = clean($_POST['location']);
Find:
$query = "insert into ".$pixelpost_db_prefix."pixelpost(datetime,headline,body,image)
In-line Find:
headline,
In-line Add after:
location,
Find:
VALUES('$datetime','$headline','$body','$image')";
In-line Find:
'$headline',
In-line Add after:
'$location',
Open: language/admin-lang-english.php
Find:
$admin_lang_ni_image_title = "Image Title";
Add after:
$admin_lang_ni_image_location = "Image Location";
Find:
$admin_lang_imgedit_title = "Title:";
Add after:
$admin_lang_imgedit_location = "Location:";
Open: language/lang-english.php
Find:
$lang_message_banned_comment = "Your comment hasn't been saved! It contains one or more banned words/email/ips.";
Add after:
// 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 (http://www.phpbb.com/kb/article.php?article_id=150). 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 (http://dwilkinsjr.com/public/mods/txtbox/txtbox_mod.xml)
Download Installer File (http://dwilkinsjr.com/public/mods/txtbox/txtbox102.zip)
(Installer file is needed to make the necessary changes to your database)
(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:
install.php
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.0
First release.
2006-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:
$image_title = htmlspecialchars($image_title,ENT_QUOTES);
Add after:
$image_location = $lang_location . pullout($row['location']);
Find:
$tpl = ereg_replace("<IMAGE_TITLE>",$image_title,$tpl);
Add after:
$tpl = ereg_replace("<IMAGE_LOCATION>",$image_location,$tpl);
Open: admin/images_edit.php
Find:
$headline = clean($_POST['headline']);
Add after:
$location = clean($_POST['location']);
Find:
$query = "update ".$pixelpost_db_prefix."pixelpost set datetime='$newdatetime', headline='$headline', body='$body', category='$category' where id='$getid'";
In-line Find:
headline='$headline',
In-line Add after:
location='$location',
Find:
while(list($id,$datetime,$headline,$body,$image,$c ategory) = mysql_fetch_row($images)) {
In-line Find:
$headline,
In-line Add after:
$location,
Find:
# $headline = htmlentities($headline);
Add after:
$location = pullout($location);
Find:
#$id, $admin_lang_imgedit_title $headline,
Add after:
$admin_lang_imgedit_location $location,
Find:
$headline = htmlspecialchars($headline,ENT_QUOTES);
Add after:
$location = pullout($imagerow['location']);
Find:
<div class='jcaption'>$admin_lang_imgedit_title</div>
<div class='content'>
<input type='text' name='headline' value='$headline' style='width:300px;' />
</div>
Add after:
<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:
<input type="text" name="headline" style="width:450px;" /><p />
Add after:
<?php echo $admin_lang_ni_image_location; ?>
<input type="text" name="location" style="width:428px;" /><p />
Find:
$headline = clean($_POST['headline']);
Add after:
$location = clean($_POST['location']);
Find:
$query = "insert into ".$pixelpost_db_prefix."pixelpost(datetime,headline,body,image)
In-line Find:
headline,
In-line Add after:
location,
Find:
VALUES('$datetime','$headline','$body','$image')";
In-line Find:
'$headline',
In-line Add after:
'$location',
Open: language/admin-lang-english.php
Find:
$admin_lang_ni_image_title = "Image Title";
Add after:
$admin_lang_ni_image_location = "Image Location";
Find:
$admin_lang_imgedit_title = "Title:";
Add after:
$admin_lang_imgedit_location = "Location:";
Open: language/lang-english.php
Find:
$lang_message_banned_comment = "Your comment hasn't been saved! It contains one or more banned words/email/ips.";
Add after:
// 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 (http://www.phpbb.com/kb/article.php?article_id=150). 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 (http://dwilkinsjr.com/public/mods/txtbox/txtbox_mod.xml)
Download Installer File (http://dwilkinsjr.com/public/mods/txtbox/txtbox102.zip)
(Installer file is needed to make the necessary changes to your database)