Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: 1 2 3 4 [5] 6 7   Go Down

Author Topic: Contact: add new menu button to display a contact form with spam prevention  (Read 136604 times)

0 Members and 1 Guest are viewing this topic.

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl

Never mind!
Still a noob but I found it myself  :)

remove <br/> on line 46 (contact.php)
remove <br><br> on line 49
remove <br> on line 63



Thanks, needed that.
Logged

rollabones

  • Coppermine newbie
  • Offline Offline
  • Posts: 9


Nevermind... I'm blind.


I installed this plug-in and all works well.

I have one picky question. Look at any of the pages on my site. You'll see all tables in the middle are at top of page directly under "Rolla Area Photo Gallery".

Now, click on "Contact Us" link. Why is there so much white space between "Rolla Area Photo Gallery" and the form? I've looked at the html and can't see anything.

Any ideas anyone?

Thanks,
Steve
http://gallery.rollanet.org/
Logged

Zeder

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

Hello,
I installed V1.3 it worked for a while sending my self email.  No I do not get any emails.  A lot of people have tried to email me and I get nothing.  I am using 1.4.12 stabl.  Any ideas?

www.infocus-imagery.com

Cheers
Z
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9097
  • aka Frantz
    • Ma galerie

is your email adress ok in the coppermine config ?
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

dke

  • Guest
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #84 on: September 01, 2007, 12:24:47 pm »

no button appears after installation, is my theme.php corrupt?
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9097
  • aka Frantz
    • Ma galerie
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #85 on: September 01, 2007, 01:01:20 pm »

what theme ?
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

dke

  • Guest
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #86 on: September 01, 2007, 09:16:46 pm »

what theme ?


macosx slightly modified
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9097
  • aka Frantz
    • Ma galerie
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #87 on: September 01, 2007, 10:33:26 pm »

did you look the sub menu under the @ button ?
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

dke

  • Guest
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #88 on: September 01, 2007, 11:32:41 pm »

did you look the sub menu under the @ button ?

Ohh its added under there? Then that explains why i didn't find it as i removed that button from my gallery. Any chance you would be so kind on how to modify it to add a button out in the open among with the other buttons?

Thanks!
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9097
  • aka Frantz
    • Ma galerie
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #89 on: September 02, 2007, 09:40:31 am »


for exemple:for displaying the contact button after the search button:
edit your codebase.php and find this function
Code: [Select]
// create button template from current sys menu template (added by Sami)
function contact_add_admin_button($href,$title,$target,$link)
{
  global $template_sys_menu, $template_sys_menu_spacer;

  $new_template=$template_sys_menu;
  $button=template_extract_block($new_template,'home');
 
   $params = array(
      '{HOME_LNK}' => $target,
      '{HOME_TITLE}' => $title,
      '{HOME_TGT}' => $href,
      'home' => $link,
   );
   $new_button="<!-- BEGIN $link -->".template_eval($button,$params)."<!-- END $link -->\n";
   template_extract_block($template_sys_menu,'home',"<!-- BEGIN home -->" . $button . "<!-- END home -->\n" .$new_button);
}
change with
Code: [Select]
// create button template from current sys menu template (added by Sami)
function contact_add_admin_button($href,$title,$target,$link)
{
  global $template_sub_menu, $template_sys_menu_spacer;

  $new_template=$template_sub_menu;
  $button=template_extract_block($new_template,'search');
 
   $params = array(
    '{SEARCH_LNK}' => $target,
      '{SEARCH_TITLE}' => $title,
      '{SEARCH_TGT}' => $href,
      'search' => $link,
   );
   $new_button="<!-- BEGIN $link -->".template_eval($button,$params)."<!-- END $link -->\n";
   template_extract_block($template_sub_menu,'search',"<!-- BEGIN search -->" . $button . "<!-- END search -->\n" .$new_button);
}
in your theme.php search
Code: [Select]
<td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_left.gif" border="0" alt="" /><br /></td>
    <td style="background-image:url(themes/mac_ox_x/images/menu_button_bg_middle.gif);" valign="top">
            <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
    </td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <td width="50%"></td>
  </tr>
</table>
and change with
Code: [Select]
<td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <!-- BEGIN search -->
    <td><img src="themes/mac_ox_x/images/menu_button_bg_left.gif" border="0" alt="" /><br /></td>
    <td style="background-image:url(themes/mac_ox_x/images/menu_button_bg_middle.gif);" valign="top">
            <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
    </td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <!-- END search -->
    <td width="50%"></td>
  </tr>
</table>
with another theme be sure the <!-- BEGIN xxxxx --> and <!-- END xxxxx --> exist .
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

dke

  • Guest
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #90 on: September 02, 2007, 12:46:40 pm »

for exemple:for displaying the contact button after the search button:
edit your codebase.php and find this function
Code: [Select]
// create button template from current sys menu template (added by Sami)
function contact_add_admin_button($href,$title,$target,$link)
{
  global $template_sys_menu, $template_sys_menu_spacer;

  $new_template=$template_sys_menu;
  $button=template_extract_block($new_template,'home');
 
   $params = array(
      '{HOME_LNK}' => $target,
      '{HOME_TITLE}' => $title,
      '{HOME_TGT}' => $href,
      'home' => $link,
   );
   $new_button="<!-- BEGIN $link -->".template_eval($button,$params)."<!-- END $link -->\n";
   template_extract_block($template_sys_menu,'home',"<!-- BEGIN home -->" . $button . "<!-- END home -->\n" .$new_button);
}
change with
Code: [Select]
// create button template from current sys menu template (added by Sami)
function contact_add_admin_button($href,$title,$target,$link)
{
  global $template_sub_menu, $template_sys_menu_spacer;

  $new_template=$template_sub_menu;
  $button=template_extract_block($new_template,'search');
 
   $params = array(
    '{SEARCH_LNK}' => $target,
      '{SEARCH_TITLE}' => $title,
      '{SEARCH_TGT}' => $href,
      'search' => $link,
   );
   $new_button="<!-- BEGIN $link -->".template_eval($button,$params)."<!-- END $link -->\n";
   template_extract_block($template_sub_menu,'search',"<!-- BEGIN search -->" . $button . "<!-- END search -->\n" .$new_button);
}
in your theme.php search
Code: [Select]
<td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_left.gif" border="0" alt="" /><br /></td>
    <td style="background-image:url(themes/mac_ox_x/images/menu_button_bg_middle.gif);" valign="top">
            <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
    </td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <td width="50%"></td>
  </tr>
</table>
and change with
Code: [Select]
<td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <!-- BEGIN search -->
    <td><img src="themes/mac_ox_x/images/menu_button_bg_left.gif" border="0" alt="" /><br /></td>
    <td style="background-image:url(themes/mac_ox_x/images/menu_button_bg_middle.gif);" valign="top">
            <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
    </td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <!-- END search -->
    <td width="50%"></td>
  </tr>
</table>
with another theme be sure the <!-- BEGIN xxxxx --> and <!-- END xxxxx --> exist .

thanks, it worked great, however the contact form looks really bad in macosx, how can i add white texture to the grey areas? And how can i make the "gap" between "contact" and "contact form" to be removed?

Thanks.
« Last Edit: September 02, 2007, 08:15:58 pm by dke »
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #91 on: September 02, 2007, 01:34:21 pm »

Adjust the colours in the coppermine stylesheet file.
Logged

dke

  • Guest
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #92 on: September 02, 2007, 01:35:37 pm »

Adjust the colours in the coppermine stylesheet file.

Hi,

I'm no high-end user, can you be a little bit more precise what i have to modify?

I've modified my style.css and looked for #7F7F7F which is "dark grey" but if i change this to #FFFFFF (which is white) my entire gallery looks weird, the dark line between thumbnails are removed etc. Is there a way to modify contact.php insted to suit my needs?
« Last Edit: September 02, 2007, 01:48:25 pm by dke »
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9097
  • aka Frantz
    • Ma galerie
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #93 on: September 02, 2007, 02:12:18 pm »

just replace the entire code of the contact.php file with this
Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

/*********************************************
  Plugin Coded by Frantz Based on Gizmo MOD
  
  Fixing contact button positioning & Added CAPTCHA confirmation
  by B.Mossavari (Sami)
**********************************************/

require('include/init.inc.php');
require (
'plugins/contact/include/init.inc.php');
pageheader($lang_plugin_contact['name']);

    
starttable("100%"$lang_plugin_contact['name'], 2);
    
?>

    <tr>
    <td colspan="2" class="tableh2" valign="top" align="center">
       <?php echo "<b>".$CONFIG['gallery_name'].":</b>".$lang_plugin_contact['intro']; ?>
    </td>
    </tr>
    <tr>
    <td colspan="2"  class="tableb" valign="top" align="left"><i><b><?php echo"<font color=red>""* ".$lang_plugin_contact['required']."</font color>"?></b></i></td>
    </tr>
<form method="post" action="index.php?file=contact/fcf_parse" name="contactform">
<tr>
<td class="tableb" valign="top" align="right" ><?php echo $lang_plugin_contact['your_name'];?> *: </td>
        <td class="tableb" align="left"><input name="Name" type="text" title="required" value="<?php if(isset($_SESSION['cnt_name'])) echo $_SESSION['cnt_name']; ?>" size="35"/></td>
</tr>
<tr>
<td class="tableb" valign="top" align="right"> <?php echo $lang_plugin_contact['your_mail'];?> *:</td>
      <td class="tableb" align="left"><input type="text" name="Email" size="35" title="required" value="<?php if(isset($_SESSION['cnt_email'])) echo $_SESSION['cnt_email']; ?>"/></td>
</tr>
<tr>
<td class="tableb" valign="top" align="right"> <?php echo $lang_plugin_contact['subject'];?> *:</td>
      <td class="tableb" align="left"><input type="text" name="Subject" size="35" title="required" value="<?php if(isset($_SESSION['cnt_subject'])) echo $_SESSION['cnt_subject']; ?>"/></td>
</tr><br/>
 <tr><td colspan="2" class="tableb" valign="top" align="center"> <?php echo $lang_plugin_contact['text'];?> *:</td></tr>     
<tr><td class="tableb" colspan="2"align="center"><textarea rows="10" cols="60" name="Comments" title="required"><?php if(isset($_SESSION['cnt_comments'])) echo $_SESSION['cnt_comments']; ?></textarea></td></tr>
      <br><br>
<tr>
<td colspan="2" class="tableb" valign="top" align="center"><b> <?php echo $lang_plugin_contact['spam_question'];?></b></td>
</tr>
<tr>
<td class="tableb" valign="top" align="right"><?php echo $question;?></td>
        <td class="tableb" align="left"><img src="plugins/contact/captcha.php" align="absmiddle" />&nbsp;
        <input type="text" name="confirmCode" id="confirmCode" size="5" class="textinput" style="width:50px; height:20px; font-size:12pt;">
        *</td>
</tr>
<tr><td colspan="2" class="tableb" valign="top" align="center">       
        <input type="hidden" value="captcha_check" id="contact_captcha" name="contact_captcha" />
        <input name="submit" type="submit" class="cfcSub" id="submit" value="<?php echo $lang_plugin_contact['submit'];?>" /></td>
</tr>
<br>
      </form>
   
    <?php
    endtable
();
pagefooter();
ob_end_flush();
?>
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

dke

  • Guest
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #94 on: September 02, 2007, 02:23:11 pm »

just replace the entire code of the contact.php file with this

Thanks so much! Not to be a pain in the ass, but isn't there anyway to remove the gap between "Contact" and Contact Form, there seems to be nothing there, is it intended for something?
Logged

dke

  • Guest
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #95 on: September 02, 2007, 08:14:19 pm »

Fixed my self, sorry for double post, i forgot i could modify my post.

Fixed by removing all <br> & </br> in contact.php

Thanks for this fantastic plugin!
Logged

dudegetalife

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #96 on: November 06, 2007, 04:23:06 am »

how do you add more words or a brief description to what appears when the user clicks the contact button?


Also, is their anyway that you can change what the menu says underneath contact whenever you are on top of it like you can with the menu buttons?
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9097
  • aka Frantz
    • Ma galerie
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #97 on: November 06, 2007, 07:30:50 am »

Quote
how do you add more words or a brief description to what appears when the user clicks the contact button?
look in the contact.php file and modify accordingly
Quote
is their anyway that you can change what the menu says underneath contact whenever you are on top of it like you can with the menu buttons?
yes make the changes in the plugin lang file
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

dudegetalife

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #98 on: November 06, 2007, 09:15:57 pm »

thx works great  ;D
Logged

DangRabbit

  • Coppermine newbie
  • Offline Offline
  • Posts: 19

my site: www.ModBookGallery.com

version: 1.4.13 (stable)

theme: gray_satin (customized)

Form: http://www.modbookgallery.com/index.php?file=contact/contact

Problem: The menu... it didn't add the button properly. It added a second "Home" button (I already  had a home button added myself to the theme) and it didn't add any button/link to the contact form...

Help :)
« Last Edit: January 30, 2008, 04:28:27 pm by DangRabbit »
Logged
Pages: 1 2 3 4 [5] 6 7   Go Up
 

Page created in 0.024 seconds with 20 queries.