Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Unclear text in Activity section for account creation
ojjuan
New
If I create a new user account via the dashboard, new info is added to the activity section. However, the wording doesn't really make sense. As the account creator, the activity says
"new_username created an account for your."
if i log in as the new user, the entry says
"You created an account for account_creators_name."
where new_username and account_creators_name are usernames.
I tested on Vanilla 2.0.17.6 with a base install (no additional plugins, themes, etc.)
"new_username created an account for your."
if i log in as the new user, the entry says
"You created an account for account_creators_name."
where new_username and account_creators_name are usernames.
I tested on Vanilla 2.0.17.6 with a base install (no additional plugins, themes, etc.)
Tagged:
1
Comments
"new_username created an account for account_creator's."
I assume it should say...
For the account creator: "You created an account for new_username"
For the new user: "account_creator created an account for you."
For everyone else: "account_creator created an account for new_username."
I'm new at this, but I suspect you can change the text in the localization file. I'll look into it.
$Definition['Activity.JoinCreated.FullHeadline'] = '%3$s created an account for %1$s.';
$Definition['Activity.JoinCreated.ProfileHeadline'] = '%3$s created an account for %1$s.';
For any problems with the text, look at the Baseline Locale files (http://vanillaforums.org/addon/baseline-locale). These have nearly all the text used in Vanilla, and the comments to that addon have a few additional text definitions. I think you can generally copy the corrected definitions into one of your existing locale definition files, even if you can't find the definition file with the wrong text.
Someone explained in another thread that the codes in the localization files are as follows:
%1$s = ActivityName
%2$s = ActivityName Possessive
%3$s = RegardingName
%4$s = RegardingName Possessive
%5$s = Link to RegardingName's Wall
%6$s = his/her
%7$s = he/she
%8$s = route & routecode
%9$s = gender suffix (some languages require this).
If you look at the baseline locale captured.php file, you can probably find enough examples to figure out what you want.
My three attempts to work around this have been:
$Definition['Activity.JoinCreated.FullHeadline'] = '%3$s created an account for %1$s.';
$Definition['Activity.JoinCreated.FullHeadline'] = 'An account for %1$s was created by %3$s.';
$Definition['Activity.JoinCreated.FullHeadline'] = '%2$s account was created by %3$s.';
If I create an account for Bob, the first gives an "you created an account for Bob." on my page. The second gives "An account for You was created by JTadmin." on Bob's page. The third gives "You account was created by JTadmin." on Bob's page.
I'm going with the first option, because only a few moderators will see the error. I can't think of anything that will be grammatically correct for both the user and the account creator.
Also, creating new users is the only time the Add User screen hangs (upon clicking Save, the data is written, but the screen doesn't close). When editing an existing user, clicking Save, saves changes and closes the screen.
== In structure.php, this entry... ==
if ($SQL->GetWhere('ActivityType', array('Name' => 'JoinCreated'))->NumRows() == 0)
$SQL->Insert('ActivityType', array('AllowComments' => '1', 'Name' => 'JoinCreated', 'FullHeadline' => '%1$s created an account for %4$s.', 'ProfileHeadline' => '%1$s created an account for %4$s.'));
== should read... ==
if ($SQL->GetWhere('ActivityType', array('Name' => 'JoinCreated'))->NumRows() == 0)
$SQL->Insert('ActivityType', array('AllowComments' => '1', 'Name' => 'JoinCreated', 'FullHeadline' => '%1$s created an account for %3$s.', 'ProfileHeadline' => '%1$s created an account for %3$s.'));
However, I suppose, for existing databases, you'd have to write a query to manually update the entries.
c:\wamo\www\vanilla\applications\dashboard\models\class.activitymodel.php
==This signature==
Add($ActivityUserID, $ActivityType, $Story = ' ', $RegardingUserID = ' ', $CommentActivityID = ' ', $Route = ' ', $SendEmail = ' ')
==should read==
public function Add($RegardingUserID = ' ', $ActivityType, $Story = ' ', $ActivityUserID, $CommentActivityID = ' ', $Route = ' ', $SendEmail = ' ')
------------------------------------------------------------------------
-- Author: GeeksRock
-- Note: This script can be used to reverse ActivityUserIDs and RegardingUserIDs.
------------------------------------------------------------------------
DELIMITER $$
CREATE PROCEDURE JoinCreatedIdReversal()
BEGIN
DECLARE maxActivityID INT(11) DEFAULT 1;
DROP TABLE IF EXISTS ReverseUserEntries;
CREATE TEMPORARY TABLE ReverseUserEntries
SELECT
gdn.ActivityID,
gdn.CommentActivityID,
gdn.ActivityTypeID,
gdn.RegardingUserID AS 'ActivityUserIDReversal',
gdn.ActivityUserID AS 'RegardingUserIDReversal',
gdn.Story,
gdn.Route,
gdn.CountComments,
gdn.InsertUserID,
gdn.DateInserted
FROM gdn_activity gdn;
SELECT MAX(ActivityID) INTO maxActivityID FROM gdn_activity;
SET maxActivityID = maxActivityID + 1;
DELETE FROM gdn_activity WHERE ActivityID < maxActivityID;
INSERT INTO gdn_activity
(ActivityID,
CommentActivityID,
ActivityTypeID,
ActivityUserID,
RegardingUserID,
Story,
Route,
CountComments,
InsertUserID,
DateInserted)
SELECT * FROM ReverseUserEntries;
END $$
DELIMITER ;