Help - Search - Member List - Calendar
Full Version: process.php UPDATED
Krazy Letter Forums > Members stuff > Computer Programs > PHPKImageHost > Modifications/Hacks
zac439
hey guys, i forgot what process.php comes with on the latest release. but i remember that i had to manually code basic things and features that should already be in it. i have decided to release my code:

[features]
1. added the one click only highlight. (no more having to select the entire box!)
2. added a nice layout for the comments/image/link box
3. added [upload another image?] link that is desperately needed.
4. formatted 8 text boxes, that copy imageshack.us and include:
direct link to image, thumbnail(1), thumbnail(2), hotlink(1), hotlink(2), mokells.ns forum, hotlink for websites, thumbnail for websites.

PLEASE NOTE! i have changed this code around to fit my site directly. you may come across some errors because your applying my code to your site, but hopefully not. if you do, please post them here so i will resolve them.


FIND: <FORM action="nowhere" method="post"> aroudn line 500 or so. after, put this:
CODE

 <table width="760" cellspacing="0" cellpadding="5" border="0" class="table_decoration" align="center"><tr>
   <td>
<center>Comments: <br>
 <?php echo (stripslashes($comments)); ?>
</center>
  <div align="center"><br>
       <font color="#FFFFFF">.</font> <font color="#FFFFFF">.........</font>Direct
       Link to Image:
       <input onclick="highlight(this);" style="width: 500px;" size="70" value="<?php echo $siteurl; ?>view/<?php echo $row['id']; ?>">
       <br>
       <font color="#FFFFFF">.....</font>Thumbnail for Forums(1):
       <input onclick="highlight(this);" style="width: 500px;" size="80" value="[URL=<?php echo $siteurl; ?>view/<?php echo $row['id']; ?>][IMG]<?php echo $siteurl; ?>uploads/thumb_<?php echo $id; ?>[/IMG][/URL]">
       <br/>
       <font color="#FFFFFF">.....</font>Thumbnail for Forums(2):
       <input onclick="highlight(this);" style="width: 500px;" size="80" value="[url=<?php echo $siteurl; ?>view/<?php echo $row['id']; ?>][img]<?php echo $siteurl; ?>uploads/thumb_<?php echo $id; ?>[/img][/url]">
       <br/>
       <font color="#FFFFFF">..........</font>Hotlink for Forums(1):
       <input onclick="highlight(this);" style="width: 500px;" size="80" value="[URL=http://YOURSITEHERE.net][IMG]http://YOURSITEHERE/index/image/<?php echo $row['id']; ?>.jpeg[/IMG][/URL]">
       <br/>
       <font color="#FFFFFF">..........</font>Hotlink for Forums(2):
       <input onclick="highlight(this);" style="width: 500px;" size="80" value="[url=http://YOURSITEHERE.net][img]http://YOURSITEHERE.net/index/image/<?php echo $row['id']; ?>.jpeg[/img][/url]">
       <br/>
       <font color="#FFFFFF">......</font>Mokkels.nl thumb forum:
       <input onclick="highlight(this);" style="width: 500px;" size="80" value="[link=<?php echo $siteurl; ?>view/<?php echo $row['id']; ?>][img]<?php echo $siteurl; ?>thumb/<?php echo $row['id']; ?>.jpeg[/img][/link]">
       <br/>
       <font color="#FFFFFF">............</font>Hotlink for Websites:
       <input onclick="highlight(this);" style="width: 500px;" size="80" value="<a href='<?php echo $siteurl; ?>view/<?php echo $row['id']; ?>'><img src='http://YOURSITEHERE.net/index/image/<?php echo $row['id']; ?>.jpeg'></a>">
       <br/>
       <font color="#FFFFFF">.......</font>Thumbnail for Websites:
       <input onclick="highlight(this);" style="width: 500px;" size="80" value="<a target='_blank' href='<?php echo $siteurl; ?>view/<?php echo $row['id']; ?>'><img src='http://YOURSITEHERE.net/index/image/<?php echo $row['id']; ?>.jpeg'></a>">
       <br/>
       <br>
       <script type="text/javascript"><!--
google_ad_client = "pub-1221184841924353";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "B4D0DC";
google_color_bg = "ECF8FF";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "6F6F6F";
//--></script>
       <script type="text/javascript"
 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
     </div></tr></td>
 </div>
</FORM>

<div align="center"><br/>

 <br/>
 <img src="<?php echo $siteurl; ?>image/<?php echo $row['id']; ?>.jpeg">
 <br/>
 </div><table align="center">
 <tr><td>
<div align="center"><br>
 [<a href="http://www.YOURSITEHERE.net">Upload another image?</a>] </div>
 <BR></tr></td></table>
 


PLEASE change YOURSITEHERE to your actual domain. also, i use the directory /index/, and you might not. please change this to the directory your sscript is used in! also, add THIS file to your directory too! (its for table decoration):

CODE
.table_decoration {

font-family: Verdana, Arial;

font-size: 11px;

border-collapse: collapse;

background-color: #ffffff;

border: solid 1px;

border-color: #CCCCCC;

empty-cells: hide;

padding: 5px;

}



.textfield {

       font-family: Verdana, Arial;

       font-size: 11px;

       color: #111111;

       border: solid 1px;

       border-color: #111111;

       

}





textarea,input,select {font: 1.0em Verdana, Tahoma, Arial, Helvetica, sans-serif;background-color: #f9f9f9; border: solid 1px; border-color: #bbbbbb; padding: 0.2em; margin-bottom: 0.3em;

}


AND FINALLY, ADD THIS TO THE TOP OF YOUR CODE!

CODE

<script type="text/javascript">

function highlight(field) {
field.focus();
  field.select();
}
-->
</script>


also, make sure you add this to your site to make sure the css formatting takes place:
CODE
<link rel="stylesheet" href="http://www.YOURSITEHERE.net/index/style.css" type="text/css">


if im missing something let me know!
lappy512
I'd prefer you to use <?php echo $siteurl; ?>

As http://YOURSITEHERE/index/ could change over time, so echoing Siteurl would change if the global setting in conf_global.php changes.

$siteurl usually equals to http://www.yourimagehost.com/ (with the trailing slash)
Threatcon
Can you post a screenshot of your changes please, or a link to your site. Thankx!

Or send me a PM smile.gif
lappy512
I didn't make any changes, I am the creator of this program.

I'm just saying instead of doing:
[url=http://YOURSITEHERE.net], do [url=<?php echo $siteurl; ?>] in your changes. It's easier. smile.gif
Threatcon
I was asking zac439

LOL
zac439
QUOTE(Threatcon @ Feb 4 2006, 07:06 PM)
I was asking zac439

LOL
*



http://www.charitypixel.net/index/view/199

oh by the way, the footer.php code my host sent me overwrote the krazyletter footer.php, and i am putting it back next time i upload all of my changes im making to my site.

and using the php echo site url is nice, but i notice that its sometimes not worth it when your dealing with an installation like mine (i have the image script scattered, and the $siteurl is something like www.charitypixel.net/, rather than /index/)

you can also go to www.charitypixel.net and see what else ive done. im working to modify the script to upload more than one image at a time right now, and will release that code as well when done smile.gif
brian
Ok. I did this. Looks nice. But now the IP addresses are not being logged. So all I see in the admin delete section is IP:

What's up?
lappy512
Perhaps you deleted a line that logged the IP?

Also, Here's what I don't get:
CODE
Thumbnail for Forums (1)
[URL=http://www.imageswarm.com/view/3274][IMG]http://www.imageswarm.com/uploads/thumb_3274[/IMG][/URL]
Thumbnail for Forums (2)
[url=http://www.imageswarm.com/view/3274][img]http://www.imageswarm.com/uploads/thumb_3274[/img][/url]


What is the difference? Besides one is capitalized and one isn't? Same with Hotlink for Forums. Also, why do you need a mokkels.nl link thing? What's so special about mokkels.nl? Can your visitors even read what's on that site (I think you have US-traffic)

Also, MAJOR PROBLEM: The hotlink and thumbnail for websites are the same, no difference, and the thumbnail for the forums doesn't have the ".jpeg" extension.

I think that's all my comments, brian.
zac439
QUOTE(lappy512 @ Feb 7 2006, 09:45 PM)
Perhaps you deleted a line that logged the IP?


im sure i did, but i dont need it so i never fixed it. ill look through the code tonight and submit a fixed version.
QUOTE(lappy512 @ Feb 7 2006, 09:45 PM)
Also, Here's what I don't get:
CODE
Thumbnail for Forums (1)
[URL=http://www.imageswarm.com/view/3274][IMG]http://www.imageswarm.com/uploads/thumb_3274[/IMG][/URL]
Thumbnail for Forums (2)
[url=http://www.imageswarm.com/view/3274][img]http://www.imageswarm.com/uploads/thumb_3274[/img][/url]


What is the difference? Besides one is capitalized and one isn't? Same with Hotlink for Forums. Also, why do you need a mokkels.nl link thing? What's so special about mokkels.nl? Can your visitors even read what's on that site (I think you have US-traffic)

this was just an effort to be more like imageshack.us, the leading image hosting site. im sure SOME forums only accept lowercase or uppercase tags. could be useful i guess, who knows.
[quote=lappy512,Feb 7 2006, 09:45 PM]
Also, MAJOR PROBLEM: The hotlink and thumbnail for websites are the same, no difference, and the thumbnail for the forums doesn't have the ".jpeg" extension.
hotlink/thumbnail for websites arent the same?
hotlink:
CODE
<a href='http://www.charitypixel.net/index/view/237'><img src='http://charitypixel.net/index/image/237.jpeg'></a>

thumb:
CODE
<a target='_blank' href='http://www.charitypixel.net/index/view/237'><img src='http://charitypixel.net/index/image/237.jpeg'></a>

[\quote]

also, the thumbnail doesnt need the jpeg extension, i believe i tested this out and actually got it not working with the extension. ive tested every feature in my process.php and they all work. thanks for your comments and feedback, and sorry about submitting this with the ip address logger out, ill fix tonight! biggrin.gif
I think that's all my comments, brian.
lappy512
Yes, I know, but thumbnail without the extension defeats the purpose, it won't work on forums anymore (test it out on KrazyLetter), most forums only allow hotlinking images with a valid image extension.

All of my comments were directed at brian, actually

And plus, Imageshack's two "hotlink for forums" are these:

CODE
1:
[URL=http://imageshack.us][IMG]http://img519.imageshack.us/img519/1743/anthemfist6tw.jpg[/IMG][/URL]
2:
[url=http://imageshack.us][img=http://img519.imageshack.us/img519/1743/anthemfist6tw.jpg][/url]


It uses [img] and [img=], which are different.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.