In which file can i find this?

Started by robinrobin, July 28, 2009, 02:01:20 PM

Previous topic - Next topic

robinrobin

$txt['activate_success'] is the part in Login.english.php which says "Your account has been successfully activated...", but i can't find which file that actually "links" to $txt['activate_success']. I want to edit that landing page when people activate their accounts. Anyone know which file i need to edit?

tyty1234

If anything, it should be in Login.template.php. ;)
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

robinrobin

Thank you.

I thought so as well, but searching for activate_success gives me nothing in that file.

Bulakbol

Try looking at Sources/Register.php.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

robinrobin

Ok, i found it. This is more complicated than i thought though.

One of the things i want to modify on the activation page is to remove the login fields. The thing is that, well, see for yourself:


$context += array(
'page_title' => &$txt['registration_successful'],
'sub_template' => 'login',
'default_username' => $row['member_name'],
'default_password' => '',
'never_expire' => false,
'description' => &$txt['activate_success']
);


The page follows a "sub template" called "login". Seems like i would have to edit the whole login function of the forum to do this and that's not a task i'm ready to undertake.

Does anyone have an idea for how i can replace all of the above code with simple text? When i remove the 'sub_template' to 'never_expire' rows, the activation landing page shows an error about not finding the template. Ugh, so tricky.

tyty1234

What exactly do you want to show on the activation landing page? Did you want to change what $txt['activate_success'] says? Or the template?
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

robinrobin

The template i guess. I want to remove the login fields to begin with, but how can i without having to change the entire login sub-template? That's what i'm wondering.

jorgen

Does anybody have a good answer on this?

I'd like to do it as well. I have integrated SMF nd Joomla with JFusion, and JFusion really demands that I use the JFusion login-module to log in. So I need to not show the loginform inside SMF...

jorgen

Quote from: jorgen on August 05, 2009, 04:29:06 PM
Does anybody have a good answer on this?

I'd like to do it as well. I have integrated SMF nd Joomla with JFusion, and JFusion really demands that I use the JFusion login-module to log in. So I need to not show the loginform inside SMF...

I also need to not show the login when the user forgets a password and resets it via a link in a mail...

robinrobin

Customization control over the landing pages of all kinds of registration, activation, login, logout and confirmation pages as well as all e-mails sent by the forum and the landing pages for all of the links that those e-mails lead to.

All that would be a dream come true if the SMF team could get to work on. Mods just cause more problems so i wouldn't rely on them to do things like these.

Arantor

This is much more a question about integration SMF into something larger, much better suited to the Portals, Bridges and Integrations board, where there are quite a few threads on Joomla/JFusion integration.

robinrobin

Oh, so i have to bridge my forum with a third application just to remove the login field from the landing page of the activation for new members' account? Hurray for SMF's spectacular customization possibilities.

Arantor

I assumed you were already attempting to bridge it with a third party application? Is that not what you're doing?

robinrobin

I have bridged applications for other reasons, like adding features. Customizing what SMF already have shouldn't have anything to do with other applications. It should be able to be done easily in the code itself.

Arantor

Sorry, I completed missed it. What exactly are you actually trying to do?

Are we talking skipping the log in screen purely on forum account activation, or account activation from a third-party app?

robinrobin

You register. You get an activation e-mail. You click the link to activate your account. The page that you comes to says that the account has been successfully activated and shows login fields underneath that text on that page. I want to remove those login fields.

Arantor

So you want to log in without a password on successful activation? Just for forum activations, nothing else?

robinrobin

I have another place for the login field that always is visible and i want everyone to log in via that field, not the field on the landing page for activation. I have the login field safe. I just want to remove it from the landing page of the activation e-mail.

Arantor

First up, $txt['activate_success'] is in languages/Login.english.php.

The relevant code I think you want to modify is in Sources/Register.php. Specifically:


$context += array(
'page_title' => &$txt['registration_successful'],
'sub_template' => 'login',
'default_username' => $row['member_name'],
'default_password' => '',
'never_expire' => false,
'description' => &$txt['activate_success']
);


This contains the subtemplate to load upon activation - it's in Activate().

I believe if you alter the sub_template, it should proceed to simply note that they are approved. They'll still have to log in though, I'm not sure how you go about the integration hooks to log them automatically (but it is doable, just my knowledge in that area is lacking)

robinrobin

I have tried removing sub_template and the site just gives an error. There apparently must be a sub_template there, but i don't know which one i could use.

Advertisement: