Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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 182756 times)

0 Members and 1 Guest are viewing this topic.

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #40 on: November 18, 2006, 01:33:08 pm »

Hey Hein,
Quote
Attached dutch.php

You was to fast, no file attached  :D
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

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 #41 on: November 18, 2006, 01:45:59 pm »

Hey Hein,
You was to fast, no file attached  :D

Ok. Now it is attached  ;D

I don't want to nag but is it possible to make the contact form button only appear to registered users ?

Cheers!
Hein
« Last Edit: November 18, 2006, 01:51:52 pm by Hein »
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #42 on: November 18, 2006, 01:59:28 pm »

Frantz, once word gets out about this, you're going to have one of most popular plugins.  ;)
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #43 on: November 18, 2006, 02:21:06 pm »

@Gizmo
Thank's , but it's Your Mod who inspired me  ;)
@Hein
Quote
I don't want to nag but is it possible to make the contact form button only appear to registered users ?
in codebase.php search
Code: [Select]
function contact_page_start()

    global $template_sys_menu, $template_sys_menu_spacer, $template_sys_menu_button, $sys_menu_buttons;
    global $CONFIG, $lang_plugin_contact;
    require ('plugins/contact/include/init.inc.php');
    require_once('plugins/contact/include/captcha.class.php');
   
  contact_add_admin_button('index.php?file=contact/contact',$lang_plugin_contact['menu_link'],$lang_plugin_contact['menu_link'],$lang_plugin_contact['menu_link']);
}
and replace with:
Code: [Select]
function contact_page_start()

    global $template_sys_menu, $template_sys_menu_spacer, $template_sys_menu_button, $sys_menu_buttons;
    global $CONFIG, $lang_plugin_contact;
    require ('plugins/contact/include/init.inc.php');
    require_once('plugins/contact/include/captcha.class.php');
   
if (USER_ID){ contact_add_admin_button('index.php?file=contact/contact',$lang_plugin_contact['menu_link'],$lang_plugin_contact['menu_link'],$lang_plugin_contact['menu_link']);
}
}
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

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 #44 on: November 18, 2006, 05:17:19 pm »

Thanks Frantz. Attached codebase file for registered users only.

Cheers!
Hein

p.s. <Yoda> Gizmo speaks truth he does</Yoda>  :D
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #45 on: November 18, 2006, 05:42:41 pm »

[ot]
Woops. No winzip on my home pc. Only winrar. Downloading winzip now to zip the file ;)
I recommend using 7zip as tool for all purposes that relate to compressing and uncompressing stuff. It's free, open source, fast, multi-lingual.
If you don't have a zip utility ready, you can attach single files by just renaming then (e.g. from dutch.php to dutch.php.txt) and just tell people that they have to rename it back after downloading.
[/ot]
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 #46 on: November 18, 2006, 05:52:21 pm »

you read my mind  ;D
Logged

docgonzo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #47 on: November 19, 2006, 06:05:58 pm »

Hi there...
I Installed this, but there seems to be a problem with the captcha image.
It won't show on the page.
What am i doing wrong ?

Check http://www.docgonzo.com/index.php?file=contact/contact
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #48 on: November 19, 2006, 08:15:30 pm »

Enable debug please
Logged
‍I don't answer to PM with support question
Please post your issue to related board

docgonzo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #49 on: November 19, 2006, 08:43:34 pm »

Enable debug please

Code: [Select]
USER:
------------------
Array
(
    [ID] => d229d9cd7d452f3861aa3d4834ec9b63
    [am] => 1
    [liv] => Array
        (
            [0] => 20698
            [1] => 21203
            [2] => 20884
            [3] => 21451
            [4] => 30328
        )

    [lap] => 1
    [name] => ladida
    [lang] => english
    [search] => Array
        (
            [search] => jessica
            [album] => search
            [title] => on
            [newer_than] =>
            [caption] => on
            [older_than] =>
            [keywords] => on
            [type] => AND
            [params] => Array
                (
                    [title] => on
                    [caption] => on
                    [keywords] => on
                )

        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => Doc Gonzo
    [groups] => Array
        (
            [0] => 1
        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg11d__filetypes; (0s)
    [1] => select * from cpg11d__plugins order by priority asc; (0s)
    [2] => delete from `docgonzo`.cpg11d__sessions where time<1163961718 and remember=0; (0.002s)
    [3] => delete from `docgonzo`.cpg11d__sessions where time<1162755718; (0.002s)
    [4] => select user_id from `docgonzo`.cpg11d__sessions where session_id=md5("3dfa0a1806031ccad06163eb155bb87a0f0260e4123c8a7828a88f683fb53a99"); (0.001s)
    [5] => select user_id as id, user_password as password from `docgonzo`.cpg11d__users where user_id=1 (0s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.avatar_url AS avatar_url, u.enable_admin_email AS notify, u.auto_subscribe_post AS auto_subscribe_post, u.auto_subscribe_comment AS auto_subscribe_comment, u.user_group+100 AS group_id FROM `docgonzo`.cpg11d__users AS u INNER JOIN `docgonzo`.cpg11d__usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
    [7] => SELECT user_group_list FROM `docgonzo`.cpg11d__users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
    [8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg11d__usergroups WHERE group_id in (1) (0s)
    [9] => SELECT group_name FROM  cpg11d__usergroups WHERE group_id= 1 (0s)
    [10] => update `docgonzo`.cpg11d__sessions set time='1163965318' where session_id=md5('3dfa0a1806031ccad06163eb155bb87a0f0260e4123c8a7828a88f683fb53a99'); (0.001s)
    [11] => SELECT user_favpics FROM cpg11d__favpics WHERE user_id = 1 (0.001s)
    [12] => SHOW TABLES LIKE 'cpg11d__cms_config' (0.001s)
    [13] => SELECT * FROM cpg11d__cms_config (0s)
    [14] => DELETE FROM cpg11d__mod_online WHERE last_action < NOW() - INTERVAL 10 MINUTE (0.001s)
    [15] => REPLACE INTO cpg11d__mod_online (user_id, user_name, user_ip, last_action) VALUES ('1', 'Doc Gonzo', '84.196.109.223', NOW()) (0.001s)
    [16] => SELECT count(*) FROM  cpg11d__pms WHERE owner=1 (0s)
    [17] => SELECT count(*) FROM  cpg11d__pms WHERE owner=1 AND showed='0' (0s)
    [18] => SELECT count(*) FROM  cpg11d__buddy WHERE user_id=1 (0s)
    [19] => SELECT count(*) FROM  cpg11d__buddy_req WHERE buddy_to=1 (0s)
    [20] => DELETE FROM cpg11d__banned WHERE expiry < '2006-11-19 21:41:58' (0.001s)
    [21] => SELECT * FROM cpg11d__banned WHERE (ip_addr='84.196.109.223' OR ip_addr='84.196.109.223' OR user_id=1) AND brute_force=0 (0s)
    [22] => SELECT COUNT(*) FROM cpg11d__pictures WHERE approved = 'NO' (0s)
)

==========================
GET :
------------------
Array
(
    [file] => contact/contact
)

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.10-18 - OK
------------------
mySQL version: 4.0.24_Debian-10sarge2-log
------------------
Coppermine version: 1.4.10 modpack v1(stable)
==========================
Module: gd
------------------
module doesn't exist
==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 4.0.24
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.2
Linked Version 1.2.2
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/share/php:/usr/share/pear | .:/usr/share/php:/usr/share/pear
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | me@localhost.com | me@localhost.com
sendmail_path | /usr/sbin/sendmail -t -i -f postmaster@premiumhosting.be | /usr/sbin/sendmail -t -i -f postmaster@premiumhosting.be
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | -1 | -1
upload_max_filesize | 25M | 25M
post_max_size | 25M | 25M
==========================
Page generated in 0.205 seconds - 23 queries in 0.011 seconds - Album set : ; Meta set: ;
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #50 on: November 19, 2006, 08:48:37 pm »

I said enable it not post it !
Enable debug and go to contact and see if make any error , warning ...
Logged
‍I don't answer to PM with support question
Please post your issue to related board

docgonzo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #51 on: November 19, 2006, 08:51:04 pm »

I said enable it not post it !
Enable debug and go to contact and see if make any error , warning ...
That was the output from the Contact page.
No error's to my knowledge.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #52 on: November 19, 2006, 09:09:06 pm »

in fact your posted debug info helped me out to see the issue ;D
- You need GD2 + freetype support to use this plugin
you can use the older version with mathematic question instead
Logged
‍I don't answer to PM with support question
Please post your issue to related board

parti02

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #53 on: December 07, 2006, 11:41:51 am »

Hi all,
i hope you can understand my english??  :o
I have installed the contact-plugin, but it will be dont show in my i games theme.
I have change the theme.php, i think thats the problem, but i will use my changed theme.php in the future.
How can i include the contact-plugin in my theme.php?

Code: [Select]
define('THEME_HAS_RATING_GRAPHICS', 1);
define('THEME_HAS_NO_SUB_MENU_BUTTONS',1);
define('THEME_IS_XHTML10_TRANSITIONAL',1);  // Remove this if you edit this template until
                                            // you have validated it. See docs/theme.htm.

// HTML template for sys menu
$template_sys_menu = <<<EOT

<!-- BEGIN home -->
<!-- <a href="{HOME_TGT}" title="{HOME_TITLE}" >{HOME_LNK}</a> -->
<!-- END home -->

<!-- BEGIN my_gallery -->
<a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}" >{MY_GAL_LNK}</a>|
<!-- END my_gallery -->

<!-- BEGIN allow_memberlist -->
<a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a>|
<!-- END allow_memberlist -->

<!-- BEGIN my_profile -->
<a href="{MY_PROF_TGT}" title="{MY_PROF_LNK}">{MY_PROF_LNK}</a>|
<!-- END my_profile -->

<!-- BEGIN faq -->
<a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a>|
<!-- END faq -->

<!-- BEGIN enter_admin_mode -->
<a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a>|
<!-- END enter_admin_mode -->

<!-- BEGIN leave_admin_mode -->
<a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a>|
<!-- END leave_admin_mode -->

<!-- BEGIN upload_pic -->
<a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a>|
<!-- END upload_pic -->

<!-- BEGIN register -->
<a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a>|
<!-- END register -->

<!-- BEGIN login -->
<a href="{LOGIN_TGT}" title="{LOGIN_LNK}">{LOGIN_LNK}</a>|
<!-- END login -->

<!-- BEGIN logout -->
<a href="{LOGOUT_TGT}" title="{LOGOUT_LNK}">{LOGOUT_LNK}</a>|
<!-- END logout -->

EOT;

// HTML template for template sub_menu
// special note: I left the java 'hide' off of the first and third buttons to help avoid trouble keeping sys_menu open. :Donnoman
if ($CONFIG['custom_lnk_url'] != '') {
$template_sub_menu = <<<EOT
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
<!-- BEGIN custom_link -->
                                  <td class="top_menu_left_bttn">
                                       <a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>

<!-- END custom_link -->
                                        <td class="top_menu_bttn">
                                                <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="javascript:;" onmouseover="MM_showHideLayers('SYS_MENU','','show')">@</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTUP_TGT}" title="{LASTUP_LNK}">{LASTUP_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                  <!--<td class="top_menu_bttn">
                                                <a href="{LASTCOM_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{LASTCOM_LNK}">{LASTCOM_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPN_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPN_LNK}">{TOPN_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>-->
                                        <td class="top_menu_bttn">
                                                <a href="{TOPRATED_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPRATED_LNK}">{TOPRATED_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="http://localhost/gallery/credits.php" title="Credits">Credits</a>
                                        </td>
                                    <!--<td class="top_menu_bttn">
                                                <a href="{FAV_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{FAV_LNK}">{FAV_LNK}</a>
                                        </td>-->
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn_right">
                                       [b]**** Here i want to include the contact plugin ****[/b]
                                        <td width="100%">&nbsp;</td>
                                </tr>
                        </table>
EOT;

Sorry for the long code.
Greatings
Parti
« Last Edit: December 07, 2006, 03:36:45 pm by parti02 »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #54 on: December 08, 2006, 05:32:52 am »

Post a link to your gallery please (with installed plugin)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

parti02

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #55 on: December 08, 2006, 03:12:19 pm »

Ok, you can visit my gallery at

http://parti.dyndns.org/gallery/index.php

on the right side of the sysmenu you will see the contact button,
i include it manually in the /igames/theme.php with
<a href="plugins/contact/contact.php" title="Contact">Contact</a>

Thx
Parti
« Last Edit: December 08, 2006, 03:33:40 pm by parti02 »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #56 on: December 08, 2006, 10:58:30 pm »

Here is the problem , Contact plugin use home button theme to create contact button and as you comment out (by adding <!--) your home button that plugin generate comment out contact button so you can't see it ;D
Logged
‍I don't answer to PM with support question
Please post your issue to related board

parti02

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #57 on: December 09, 2006, 11:52:23 am »

Thx Sami, that was the problem, after enable GD2   ;D it runs nice.
Is there a way to start the contact form manually from my theme.php in the submenu section,
and disable the home button in the sysmenu.
Pls see my code above on the bottom.

Sry, i am not a coder, i hope i call the menus right and you understand it  :P

Parti
 
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #58 on: December 09, 2006, 12:27:21 pm »

Everything is okey you just need to change href value of link to index.php?file=contact/contact instead of plugins/contact/contact.php
Logged
‍I don't answer to PM with support question
Please post your issue to related board

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Contact: add new menu button to display a contact form with spam prevention
« Reply #59 on: December 09, 2006, 01:32:35 pm »

For using the plugin, i think it's possible to change in codebase.php
Code: [Select]
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);
}
to
Code: [Select]
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,'my_gallery');
 
   $params = array(
      '{MY_GAL_LNK}' => $target,
      '{MY_GAL_TITLE}' => $title,
      '{MY_GAL_TGT}' => $href,
      'home' => $link,
   );
   $new_button="<!-- BEGIN $link -->".template_eval($button,$params)."<!-- END $link -->\n";
   template_extract_block($template_sys_menu,'home',"<!-- BEGIN my_gallery -->" . $button . "<!-- END my_gallery -->\n" .$new_button);
}
« Last Edit: December 09, 2006, 04:21:22 pm by Frantz »
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
Pages: 1 2 [3] 4 5 6 7   Go Up
 

Page created in 0.041 seconds with 20 queries.