|
#1
|
|||
|
|||
|
Simplicious Modification
I did some modifications to the famous template 'simplicious' which is originally done by Jay Soto! As I wanted a few 'special things' in my blog to individualize it, I created those mods:
-display and fading of categorys and tags in browse -display and fading of a contact form in about -adjusting the focal length, depending on camera (with @35mm addon) -renaming my Ricoh GRD II So here I will show you, what I've done and how you can do it in 'your style'. ################################################## ### first, the category and tag thing in browse: We need two files. once the template file (browse_template.html) in your /templates/simplicious folder. In this file, we add the js-files into the head-section: HTML Code:
<script src="templates/simplicious/scripts/prototype.js" type="text/javascript"></script> <script src="templates/simplicious/scripts/scriptaculous.js?load=effects" type="text/javascript"></script> <script type="text/javascript" src="templates/simplicious/js/jquery.js"></script> <script type="text/javascript" src="templates/simplicious/js/interface.js"></script> <script type="text/javascript" src="templates/simplicious/scripts/image_fade.js"></script> <!--[if lt IE 7]> <style type="text/css"> div, img { behavior: url(templates/simplicious/iepngfix.htc) } </style> <![endif]--> next, we create the link we need for fading: the link wrappend around 'category' should be changed to the following HTML Code:
<a onclick="Effect.toggle('info','BLIND'); return false;" title="View Categories and Tags" href="#">
HTML Code:
<div id="info" style="padding:5px;<CUST_DISPLAY>"> CATEGORIES:<br /> <CATEGORY_LINKS_AS_LIST> <br /><br /> <div id="warchives" style=";position:relative;bottom:10px;"> TAGS:<br /> <TAG_LINKS_AS_LIST> </div> </div> I named mine browse_display.php. Into this file, put the following code and save it: PHP Code:
)################################################## ### second, the contact form which fades in in the about page: We also need two files here. First, the about-template (template/simplicious/about_template.html). Open it and add also the js-code from above into the headsection. The link for the contact-form should look like this: HTML Code:
<a onclick="Effect.toggle('info','BLIND'); Effect.toggle('mehh','BLIND');return false;" title="contact me" href="#">
HTML Code:
<img src="templates/simplicious/images/me.jpg" alt="" border="0" id="mehh" style="display:<IMG_DISP_INC>;"/> <div id="info" style="display:<INFO_DISP_INC>;width:600px;"> <EMAIL_FORM_INC> </div> I named mine mail_form.php but it doesn't matter. In this file add the following php-code: PHP Code:
Well that's it, upload both files, activate the addon and try. BTW, the addon takes the mail-adressed saved in your PP-adminpanel. ################################################## ### |
|
#2
|
|||
|
|||
|
third, the tag-customize:
I had some trooubles with my Ricoh GRD II and Canon 5D. If I display the exif-tag of the camera model, I see 'Canon EOS 5D' and 'GR Digital 2'. But I want to display the Brand of the GRD2 also. So I made this little snippet: PHP Code:
HTML Code:
<EXIF_CAMERA_MODEL_RICOH>
And at least I wanted the 35mm addon to display the crop and, if i've done the shot with my 5D, to display that there is no crop (fullframe) I realized that in this way, basically it's the 35mm addon by xerxes (http://www.pixelpost.org/extend/addons/35-mm/) PHP Code:
################################################## ### |
|
#3
|
|||
|
|||
|
Hi
Let me be the first to say thank you, amazing work. Christian |
|
#4
|
|||
|
|||
|
Nice...but
Great addon, one request though...
I don't know any German so I tried to translate into English, I hope I got it right! I always get the error message when I submit the form, even when all fields are complete...any ideas why? Thanks! |
|
#5
|
|||
|
|||
|
hm,, maybe you changed something in the php-file? if so, please tell me what you changed.
|
|
#6
|
|||
|
|||
|
Hi
No, I don't think I changed anything. here's my exact PHP file... <?php if($_GET['x']=='about'){ if($_GET['sent']==1) { $row = sql_array("select email from ".$pixelpost_db_prefix."config order by id DESC limit 0,1"); $empf=$row[0]; //Form-Verarbeitung $cont=''; $name=trim($_POST['name']); $mail=trim($_POST['mail']); $subj=trim($_POST['subject']); $msg=trim($_POST['message']); if(empty($name) OR empty($mail) OR empty($subject) OR empty($message)){ header('Location: index.php?x=about&err=1'); exit; } $msg=nl2br($msg); //Verarbeiten wir das Ding: $message = '<html> <head> <title>Kulay Photography</title> </head> <body> <u>Website:</u><br /> '.$subj.'<br /><br /> <u>Comments:</u><br /> '.$msg.'<br /><br /> <u>Name:</u><br /> '.$name.'</u><br /> <u>Mail:</u><br /> '.$mail.'<br /> </body> </html> '; $ms_copy='<html> <head> <title>Kulay Photography</title> </head> <body> This is a copy of the message you sent to Kulay Photography! <br /> <u>Website:</u><br /> '.$subj.'<br /><br /> <u>Comments:</u><br /> '.$msg.'<br /><br /> <u>Name:</u><br /> '.$name.'</u><br /> <u>Mail:</u><br /> '.$mail.'<br /> </body> </html> '; $headers .= 'From:' . $mail . "\n"; $headers .= 'Reply-To:' . $mail . "\n"; $headers .= 'X-Mailer: PHP/' . phpversion() . "\n"; $headers .= 'X-Sender-IP: ' . $REMOTE_ADDR . "\n"; $headers .= "Content-type: text/html\n"; mail($empf, 'kulayphotography.com - '.$subj, $message, $headers); mail($mail, 'Kulayphotography.com - Copy: '.$subj, $ms_copy, $headers); $img_disp='none'; $info_disp='visible'; $cont='Thanks for your comment! <br /> A copy has been sent to the E-Mail address you provided!'; } else { $cont=''; if($_GET['err']==1) { $cont.='Ooops!<br />Please complete all fields.'; } $cont.='<form name="contact" method="post" action="index.php?x=about&sent=1">'; $cont.='<table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin: 5px;"> <tr> <td height="19" colspan="2" valign="bottom" class="maildesc">Name<span class="mailred">*</span>: </td> </tr> <tr> <td width="32" height="1"></td> <td width="297"></td> </tr> <tr> <td height="22" colspan="2" valign="top"> <input tabindex="1" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="name" type="text" id="name" size="30" /> </td> </tr> <tr> <td height="19" colspan="2" valign="top" class="maildesc">E-Mail<span class="mailred">*</span>:</td> </tr> <tr> <td height="22" colspan="2" valign="top"> <input tabindex="2" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="mail" type="text" id="mail" size="30" /> </td> </tr> <tr> <td height="19" colspan="2" valign="top" class="maildesc">Website<span class="mailred">*</span>:</td> </tr> <tr> <td height="22" colspan="2" valign="top"> <input tabindex="3" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="subject" type="text" id="subject" size="30" /> </td> </tr> <tr> <td height="19" colspan="2" valign="top" class="maildesc">Comments<span class="mailred">*</span>:</td> </tr> <tr> <td height="120" colspan="2" valign="top"> <textarea tabindex="5" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="message" cols="40" rows="6" id="message"></textarea> </td> </tr> <tr> <td height="2"></td> <td></td> </tr> <tr> <td height="2"></td> <td></td> </tr> <tr> <td height="7"></td> <td></td> </tr> <tr> <td height="15" colspan="2" valign="top"> <div align="left"> <input type="submit" value=" SEND "> </div></td> </tr> </table>'; $cont.='</form>'; if($_GET['err']==1) { $img_disp='none'; $info_disp='visible'; } else { $img_disp='visible'; $info_disp='none'; } } $tpl = str_replace("<EMAIL_FORM_INC>",$cont,$tpl); $tpl = str_replace("<INFO_DISP_INC>",$info_disp,$tpl); $tpl = str_replace("<IMG_DISP_INC>",$img_disp,$tpl); } // Formal add-on information $addon_name = "adds an emailForm to PP"; $addon_description = "Adds an simple Email-Form"; $addon_version = "1.0"; ?> |
|
#7
|
|||
|
|||
|
Hi
I also do not get the mail form? not sure where is the message going to? I have not change anything in it. |
|
#8
|
|||
|
|||
|
@kulay: the error have to be here:
PHP Code:
Maybe both of you want to contact me over skyoe or icq for errordiagnostics ![]() regards, bernhard |
|
#9
|
|||
|
|||
|
Hi Bernhard
That worked for me, thank you! Regards Paul |
|
#10
|
|||
|
|||
|
hi
Thanks Bernhard, got it working. Much appreciated. Regards Christian |
| Post Reply |
| Thread Tools | |
|
|