News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Contact Page

Started by SMFHacks.com Team, July 06, 2006, 12:59:38 PM

Previous topic - Next topic

desistyle

and how would i do that ?

psi0

Hello,

I want translate module to other language.

Is that possible? how?

Thanks

vbgamer45

Edit the text strings in Modifications.english.php
and edit the text in /Themes/default/Contact.template.php
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

psi0

Thanks vbgamer45.

I think you should put text of Contact.template.php in Modifications.*.php to can be easy to translate and can be use when we have a forum with several language.

vbgamer45

Yeah I plan to do that more in the future. Just easier for me to get the mod out   . Then later make the make the text changes.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

FinsandFur

vbgamer45, Can you tell me as a newbie what I need to do to get the contact button to display on my forums.
I've successfully installed the mod, and I've granted permission to all users except guests. But I cannot get it to display the button.

I'm running SMF1.0.7 and using Blocs cerberus theme.

Thanks for any help you may be able to provide.

www.finsandfur.net/forums

Vinspire

Quote from: FinsandFur on July 29, 2006, 02:39:01 AM
vbgamer45, Can you tell me as a newbie what I need to do to get the contact button to display on my forums.
I've successfully installed the mod, and I've granted permission to all users except guests. But I cannot get it to display the button.

I'm running SMF1.0.7 and using Blocs cerberus theme.

Thanks for any help you may be able to provide.

www.finsandfur.net/forums

Read the install.xml that is attached in the zip file ... The codes and etc is inside.

Basically i think you need to modify this 2 files to get it working in cerberus.

    ./Themes/cerberus/languages/Modifications.english.php
    ./Themes/cerberus/index.template.php

FinsandFur

Thanks for the reply Vinspire.
There is no ./Themes/cerberus/languages/Modifications.english.php
and I'm not sure what to edit on the other one.

Can you get me a little closer. I'm learning as I go here. ;D

vbgamer45

Use ./Themes/default/languages/Modifications.english.php  instead.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

FinsandFur

I must really be daft...and for that I appologize, but I still don't know what to do with that file ./Themes/default/languages/Modifications.english.php 

I found it and it shows my shoutbox code along with this contact page code, but I don't know what to do with it.

The shout box displays and functions fine, I have no idea how to get the contact button to display.... :-[

vbgamer45

You need to edit index.template.php of the theme you are using. That file contains the menu, headers, and footers. There is a guide some where on this place on how to use mods on non default themes.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

FinsandFur

Cool, I appreciate the reply.
I'll do some looking around and see if I can find that guide info.
Thanks vbgamer45

FinsandFur

Never did find a guide on how to use mods on non default themes.

But I got it working.

For anyone else out there with similiar issues, Here's what I did.

I'm using Blocs cerberus theme, and I know the mod installs on the default theme. I wish there was a way to make the mods understand that your custom theme WAS your default theme but....

I went to the default theme and opened the "index.template.php"
I searched out the word "contact" since this is where the mod installer installed it.

Found ALL the code that was added with this mod, which was;
// the [contact] button
if ($context['allow_view_contact'])
echo '
<a href="', $scripturl, '?action=contact">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/contact.gif" alt="' . $txt['smfcontact_contact'] . '" style="margin: 2px 0;" border="0" />' : $txt['smfcontact_contact']), '</a>', $context['menu_separator'];


Make close note of where it appears in that file by taking note of whats around it, and then copy all the code pertaining to the contact page.

I then went my Blocs cerberus theme and opened my "index.template.php" and pasted the code in the exact location it was in, in the default theme.
Which in this case was following the "calendar" button.

I hope that atleast helps ONE person in a similiar situation.

Mujahid

how can i change the contact email address?
i don`t want to use the default one.
Mujahid Webs - Home of Webmasters
http://www.mujahidwebs.com/forum [nofollow]

qd-race

Dear vbgamer45

I incidently replace the index.template.php file in default theme. I mod back and I need to check what code is missing in this file.

// The [contact us] button
if ($context['allow_view_contact'])
echo ($current_action == 'contact' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'contact' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=contact">' , $txt[804] , '</a>
</td>' , $current_action == 'contact' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Please advise the above code is correct or not and please inform the rest of the code should be in this file or please post here the original menu code that suppose to be.

Thanks.
http://www.qd-race.com |  http://www.replica2u.com  |  http://www.steamyx.net

vbgamer45

Just one you little you need to fix change

<a href="', $scripturl, '?action=contact">' , $txt[804] , '</a>

To

<a href="', $scripturl, '?action=contact">Contact</a>
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

qd-race

I refer $txt[804] to index.english.php language file in default theme. What about the rest of code in index.template.php in default theme. Any code should I add?
http://www.qd-race.com |  http://www.replica2u.com  |  http://www.steamyx.net

Darcy

#37
Hi,

Thank you for this Mod, it works perfect ! And last night, I finished translating it to Dutch and it still works  ;) (after quite some errors first  ;D )

Without a name it will tell you: U moet uw naam nog vermelden.
Without a subject it will tell you :U moet ook een onderwerp invullen.
Without a message it will tell you: U moet wel een berichtje schrijven.
Without your e-mail it will tell you: Ik heb ook uw e-mail adres nodig.

and of course when it is sent, it says: Uw bericht is verzonden! Klik hier om naar het forum terug te gaan.

Whoever wants the Dutch php files; feel free to use them.
I didn't know how to change the filenames, now the files itself don't show they're the Dutch version...
I tried to change the file to contact-nl.php but somehow I need to change something else too and I simply am too new on all this to solve that part :-[
Never the less, if needed, people may be able to change the file name themselves right ?  ;)

So I first installed the original Mod and later copied my translated files to where they should be: contact.php in Sources and contact.template.php in Themes/default  (Maybe they even will work in other themes  ??? but I didn't try that)

I left your copyright message where it was so you don't have to worry about that  ;)

Thanks again

screenshot & files below
My avatar has copyright © Maija

msbask

I'm having a strange problem with this mod.  If a guest view the main page, the contact button is not there.  I'm logged in as administrator, and I *can* see the button (and it works).

I've checked the permissions three times and actually, viewing the contact page is the ONLY permission a guest on my board *does* have.

Any clue what I'm doing wrong here?

FinsandFur

if ($context['allow_contact']) needs to be removed

Advertisement: