Link to the mod (https://custom.simplemachines.org/index.php?mod=2084)
Topic Count in Profiles
Original Author: Arantor
Description:
This mod adds a count of the number of topics a user has started, underneath their post count, plus a count of the number of different topics they have posted in overall.
It should work on any theme that uses the same base Profile template as the SMF curve theme, for anything else you may have to do a theme edit, but it is a very small edit in the profile itself.
Very Nice mod big bro . i installed it in my forum and its working awesome :) .. i really need this option i was just opening a topic for this then i just found this mod in latests .. thanks a lot :)
Should it be possible to use this value for post counted membergroups?
Could you update languages? :D
Modifications.portuguese_pt.php
$txt['profile_topics_started'] = 'Tópicos Iniciados';
Modifications.portuguese_pt-utf8.php
$txt['profile_topics_started'] = 'Tópicos Iniciados';
Modifications.portuguese_brazilian.php
$txt['profile_topics_started'] = 'Tópicos Iniciados';
Modifications.portuguese_brazilian-utf8.php
$txt['profile_topics_started'] = 'Tópicos Iniciados';
Farewell
-Costa
Thanks. Very good addition that will eventually make members open new topics. :P
alex30, the post count make member post too much :P
hey after installing this mod i got this in error log .. this error comes when we enter in a topic . and the mod is working fine just giving this error in error log
8: Undefined index: topics
File: /home/vhosts/www.mysite.com/Sources/Load.php
Line: 1214
Costa
Which is good when posts are helpful and not "LOL" ones.
hey Arantor Please Help . i got 5000+ pages in error log ..
I also have a lot of errors, but unlike Rohan, only about 45 pages... :)
The error is:
8: Undefined index: topics
File: /home/content/x/x/x/xxxxxxxxx/html/forum/Sources/Load.php
Line: 1247
It's from this code in load.php Arantor:
'topics' => comma_format($profile['topics']),
Oh, also...the topics entry is not showing up in profiles. ;)
It's probably just a small tweak needed, what do you reckon mate?
yeah the error is in 'topics' => comma_format($profile['topics']),
but everything is working fine just showing error in error log .. plz fix
I couldn't fix this last night or earlier on due to not having Internet access last night - and once I saw all your posts here this morning, I fixed the bug and the site was down.
Newly patched version on mod site, sorry for the stupid error folks, is all fixed.
Rohan_ please: I know you want it fixed, bumping it 3 times isn't going to get it fixed any quicker.
Nice job Arantor. Just a little FYI, this is a default feature in 2.0. You can list all posts, attachments and topics made via ?action=profile;u=xx;area=showposts
But again, nice mod indeed ;D
Quote from: καrηαgε™ on August 19, 2009, 03:04:10 PM
Nice job Arantor. Just a little FYI, this is a default feature in 2.0. You can list all posts, attachments and topics made via ?action=profile;u=xx;area=showposts
I know, but this gives you a handy count in the profile screen with less clicking :)
Thanks for fixing errors.
Arantor any other plans about future mods similar to this?
Just want to know what to expect. :)
With me, expect the unexpected :)
I've been asked to expand this to produce a per-category count, but not sure yet about anything else.
I tend to look at things in Mod Requests and if it's a day or so to implement I'll likely do it before long :)
hey thanx a ton big bro .. and sorry i didn't bumped it 3 times :( i just replied to alex .
Hello, congratulations, good mod, as I like to do to include the same data in the profile shown in the post:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg31.imageshack.us%2Fimg31%2F2999%2Fdibujourt.jpg&hash=f1924a698c759268ab3cd82ae101d6a72176dfd6)
I really, really wouldn't put it in the thread display's user profile, to be honest. The count of topics is not stored anywhere, meaning that it is recalculated as needed. I wouldn't want to recalculate it on a per-page basis since that could get expensive to do.
I suppose it could be modified to actually store and update the figures, but that would require the mod to calculate it for every user on install... which would be expensive to run too.
Installed and started to get this..
8: Undefined index: topics
File: /home/content/b/a/s/basschaz/html/community/Sources/Load.php
Line: 1103
Uninstalled and everything is back to "normal"
(ok as Normal as a site can be..)
When did you install it?
This is nice, good job mate :)
It compliments this (http://custom.simplemachines.org/mods/index.php?mod=1526) mod well.
A little tweak, and they combined perfectly.
Thanks
Also added a new feature to this today to display the number of different topics a user has posted in.
Nice update.
Cheers :)
Quote from: Sabre™ on August 24, 2009, 04:06:20 AM
This is nice, good job mate :)
It compliments this (http://custom.simplemachines.org/mods/index.php?mod=1526) mod well.
A little tweak, and they combined perfectly.
Thanks
I have that mod installed as well .. are you saying that if i install Arantor's mod there will be a conflict that i will have to fix ??
I'm not sure what little tweak will be needed; I don't know the other mod, but it sounds like one or the other will need a minor change to work.
Quote from: Arantor on October 31, 2009, 01:11:08 PM
I'm not sure what little tweak will be needed; I don't know the other mod, but it sounds like one or the other will need a minor change to work.
Yeah, they both make changes to the same files .. so i figure they may conflict ... will wait to see if Sabre will respond
Use the package parser on the mod site. It'll show you what edits they make. Very likely the two try to add something to the Profile page where the conflict is.
yeah, they don't seem to change the same lines of code .. still wondering what tweak Sabre is talking about ... :-\
Ok mod installed with no error's and no errors in logs .... But i think i see the tweak needed for both mods to compliment each other 8)
Arantor ... your mod ads to profile page
QuoteTopics started: 60
Topics participated in: 168
And the other mod ads to profile page
QuoteShow the last topics of this person.
Which is a clickable url link to
http://xxx.com/forum/index.php?action=profile;u=xxx;sa=showPosts;topicsSo .. a nice tweak to your mod would be
QuoteTopics started: 60
Topics participated in: 168
Which would also make the Number a clickable url point to
http://xxx.com/forum/index.php?action=profile;u=xxx;sa=showPosts;topicsCould you meybe tell me where to edit to turn your number into a clickable url pointing to the link stated ??
Should be possible with editing Profile.template.php:
<td><b>', $txt['profile_topics_started'], ': </b></td>
<td>', $context['member']['topics'], '</td>
<td><b>', $txt['profile_topics_started'], ': </b></td>
<td><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=showPosts;topics">', $context['member']['topics'], '</a></td>
NB I don't have the other mod installed so can't test this.
Magic ... works 8)
Yeah, that's all I meant, that you can link it to the topics page :)
Quote from: Sabre™ on October 31, 2009, 04:33:57 PM
Yeah, that's all I meant, that you can link it to the topics page :)
Ok kool 8) guess we did the same thing then
Hello everyone,
I have updated this mod to version 1.5. Don't try to use the upgrade mechanism; it won't work. Instead, uninstall the old one and then install the new one. I have left the old file on the server just in case you want to revert for some reason.
The new changes made are quite a few:
- Added 1.1.11 tag
- Added average topics started per day
- Added topic posting stats by hour
- SMF 1.1.x ONLY: Added a section to view a user's topics
hey i think arantor made this mod and he started this thread so why i see live627 in first post ???
Because I donated it. When mods are given away, the first post is similarly updated.
hey arantor donate me something :P
Quote from: Rohan_ on December 04, 2009, 12:19:31 PM
hey arantor donate me something :P
lol
Quote from: Arantor on December 04, 2009, 03:14:58 AM
...I donated it....
it's true as you can see in the mod description. I even left the dates to help prove it ;)
Quote from: Rohan_ on December 04, 2009, 12:19:31 PM
hey arantor donate me something :P
Details for donations: http://www.simplemachines.org/community/index.php?topic=345192.0
Arantor i wanna tell you something bro :) really :) i wanna be a expert in PHP and want to make mods and give them to you :) i wanna give you something i dont want anything from you :) you already given me a lot .. Thanks for all
I'm getting this database error, I believe only when a bot visits my forum:
Guest
66.249.68.46
Type of error: Database
http://mysite.com/forums/index.php?action=profile;area=statistics;u=37 (http://mysite.com/forums/index.php?action=profile;area=statistics;u=37)
Database Error: Unknown column 'b.member_groups' in 'where clause'
File: /home/public_html/forums/Sources/Profile-View.php
Line: 828
If I open up that file, just before line 828 there is this query which I believe is from this mod:
// Grab the topic this member posted in most often.
$result = $smcFunc['db_query']('', '
SELECT
b.id_topic, MAX(m.subject) AS name, MAX(b.num_replies) AS num_replies, COUNT(*) AS message_count
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}topics AS b ON (b.id_topic = m.id_topic)
WHERE m.id_member = {int:current_member}
AND {query_see_board}
GROUP BY b.id_topic
ORDER BY message_count DESC
LIMIT 10',
array(
'current_member' => $memID,
)
);
Interesting query.
/me would STRONGLY suggest not using COUNT(*) in a query. Bad for performance, when COUNT(id_msg) would yield better performance on InnoDB and PostgreSQL.
Quote from: Arantor on December 07, 2009, 02:37:15 AM
/me would STRONGLY suggest not using COUNT(*) in a query. Bad for performance, when COUNT(id_msg) would yield better performance on InnoDB and PostgreSQL.
Thanks for the tip.
@kai920: Can guests view profiles? Do you use the 1.1 branch or the 2.0 branch?
Quote from: live627 on December 07, 2009, 04:48:16 PM
@kai920: Can guests view profiles? Do you use the 1.1 branch or the 2.0 branch?
I am using 2.0 RC2, and guests
can view the main user profile page.
I just tried viewing a profile as a guest, and there was
no db error logged. Could this error affect bots only?
Hello,
We use 1.1.11 and we were wondering if there is a way to disable the option to list all the topics a member has participated in. We have some members who have been busy everywhere.
Also, is it possible to add a screenshot of what the 1.1.x member sees with the additional stats (new page or part of the =statPanel ?)
Grazie
Updated to 1.5.2: Added options to disable number of topics started and number of topics participated in for all three versions (1.1, 2.0 RC1, 2.0 RC2)
Wow, that was fast!
Does that disable the ability to list the topics? We don't have a problem with showing a number, but with having the site process the queries asking for a list of every topic (especially if the list query doesn't know to not include topics normally invisible to members, such as Admin-only topics).
Grazie,
Cal
Hi,
Just installed 1.52 and found a bug and had a question.
The bug: I clicked the "show Posts" link and the first page displayed is the initial posts of topics, and the count of pages (the "1, 2, 3... 13") is likely correct, the header says "Show Posts" and if I click on "2", it switches to showing posts (the count of pages increases and the end of the URL changes from "ShowTopics" to "ShowPosts").
The question: where in the AdminCP are the settings for controlling access to the Topic counts?
Grazie
Cal
I'm still getting the database errors. Any ideas what I can try in order to find the cause of the problem?
I had another play to try to figure out the interesting query and finished with 1.5.3
Options for this mod:
- 1.1.x - Features and Options -> Topic Count in Profile
- 2.0.x - Configuration -> Modifications -> Topic Count in Profile
Good news with 1.5.3:
- Admin settings control showing topic counts
- 'Show Topics' correctly displays topics after the first page
Things to look at in 1.5.3:
- 'Show Topics' is displayed no matter what boxes are checked. This is, topics started may not appear, but the 'Show topics' is still visible.
- Although 'Show Topics' works correctly, the title is still 'Show Posts'.
- Would you consider adding a checkbox to control if the "Show Topics" link is displayed?
This is a really nice MOD!
You've been very responsive and quick with updates.
Grazie mille!
Cal
Quote from: live627 on December 11, 2009, 08:20:28 PM
I had another play to try to figure out the interesting query and finished with 1.5.3
Options for this mod:1.1.x - Features and Options -> Topic Count in Profile2.0.x - Configuration -> Modifications -> Topic Count in Profile[/list]
Thanks very much live627. Will test and report back results! :)
Quote from: Cal O'Shaw on December 11, 2009, 09:01:46 PM
- 'Show Topics' is displayed no matter what boxes are checked. This is, topics started may not appear, but the 'Show topics' is still visible.
- Although 'Show Topics' works correctly, the title is still 'Show Posts'.
- Would you consider adding a checkbox to control if the "Show Topics" link is displayed?
This is a really nice MOD!
You've been very responsive and quick with updates.
Grazie mille!
Cal
- Added an option to show/hide the list of topics
- title fixed
Thanks for liking this mod
Hello,
Just installed the revised 1.5.3. Saw the additional checkbox.
Many thanks!
(the show topics still has "Latest posts of: (memberid)" in the browser tab and the table of the posts is still saying "Show Posts" but the function is there and that's what counts :) ).
Grazie!
Cal
Quote from: kai920 on December 07, 2009, 02:32:22 AM
I'm getting this database error, I believe only when a bot visits my forum:
Guest
66.249.68.46
Type of error: Database
http://mysite.com/forums/index.php?action=profile;area=statistics;u=37 (http://mysite.com/forums/index.php?action=profile;area=statistics;u=37)
Database Error: Unknown column 'b.member_groups' in 'where clause'
File: /home/public_html/forums/Sources/Profile-View.php
Quoting previous error for reference, but have a slightly different error now: (1.5.3)
Database Error: Unknown column 'b.id_topic' in 'on clause'
File: /home/public_html/forums/Sources/Profile-View.php
Line: 833
Quote from: kai920 on December 12, 2009, 04:21:51 AM
Quote from: kai920 on December 07, 2009, 02:32:22 AM
I'm getting this database error, I believe only when a bot visits my forum:
Guest
66.249.68.46
Type of error: Database
http://mysite.com/forums/index.php?action=profile;area=statistics;u=37 (http://mysite.com/forums/index.php?action=profile;area=statistics;u=37)
Database Error: Unknown column 'b.member_groups' in 'where clause'
File: /home/public_html/forums/Sources/Profile-View.php
Quoting previous error for reference, but have a slightly different error now: (1.5.3)
Database Error: Unknown column 'b.id_topic' in 'on clause'
File: /home/public_html/forums/Sources/Profile-View.php
Line: 833
I'm using SMF2RC2 & have this error too
change b.id_topic to b.id_board
Quote from: beltazar on December 12, 2009, 12:19:58 PM
I'm using SMF2RC2 & have this error too
change b.id_topic to b.id_board
You mean like this?
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
INNER JOIN {db_prefix}boards AS b ON (b.id_topic = m.id_topic)
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = m.id_topic)
Yes
Quote from: kai920 on December 07, 2009, 02:32:22 AM
I'm getting this database error, I believe only when a bot visits my forum:
Guest
66.249.68.46
Type of error: Database
http://mysite.com/forums/index.php?action=profile;area=statistics;u=37 (http://mysite.com/forums/index.php?action=profile;area=statistics;u=37)
Database Error: Unknown column 'b.member_groups' in 'where clause'
File: /home/public_html/forums/Sources/Profile-View.php
Line: 871
Getting this same error, except now it's line 871...
1.5.4 is out; titles are fixed and those stickler database errors should be gone now
Thanks live627 - would like to test but I'm getting an error on install for ./Sources/Profile-View.php, the 2nd step. I tried to see why it was failing, but couldn't figure it out.
Any ideas? This is on a fairly vanilla test RC2 forum with only tagging system and board sort methods installed. It had topic count in profiles 1.5.3 which uninstalled successfully.
edit: the attached xml seems to work
Got a typo error in 1.5.4!
Using SMF 1.1.11:
In the 3rd edit of themes/default/Profile.template.php you have "showTosts" instead of "showPosts"? or "showTopics"?, which is throwing an error:
8: Undefined index: showTosts
File: /home/xxx/public_html/forum/Themes/default/Profile.template.php
Line: 468
Cal
lol what a silly typo! I fixed that and reupped. Thanks for pointing that out! :)
@kai920
Thanks for this updated install20.xml, works without a problem!
Quote from: Fisch.666 on January 07, 2010, 03:10:29 PM
@kai920
Thanks for this updated install20.xml, works without a problem!
You're welcome :)
Installed the mod though I had one minor edit.
I can't see any changes.
:(
AdminCP => Configuration => Modifications => Topic Count in Profiles
Thanks Live.
I managed to find it eventually last night.
:)
Update for rc3 ?
Version 1.6 is an update for SMF 2.0 RC3
Mod only counts or you can display a list?
1. Topics started
2. Topics participated in
It only displays the count of those two stats
A very useful feature of "Topics participated in", somebody will do to it output a list of topics?
Not working for me, getting this error:
Template Parse Error!
There was a problem loading the /Themes/default/Profile.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.
You may want to try to refresh this page or use the default theme.
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/default/Profile.template.php on line 130
121: echo '
122: <dt>', $txt['profile_posts'], ': </dt>
123: <dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
124:
125: echo '
126: <dt>', $txt['profile_topics_started'], ': </dt>
127: <dd>', $context['member']['topics'], ' ('. $context['member']['topics_per_day'], ' ', $txt['posts_per_day'], ')</dd>
128: <dt>', $txt['profile_topics_participated'], ': </dt>
129:
130: // Only show the email address fully if it's not hidden - and we reveal the email.
131: if ($context['member']['show_email'] == 'yes')
132: echo '
133: <dt>', $txt['email'], ': </dt>
134: <dd><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a></dd>';
.
This one on the direct link it asks to go:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/frozenas/public_html/test/forum/Themes/default/Profile.template.php on line 130
.
Latest versions, default themes...
Line 129:
<dt>', $txt['profile_topics_participated'], ': </dt>
<dt>', $txt['profile_topics_participated'], ': </dt>';
Done, still the same~:
119:
120: if (!isset($context['disabled_fields']['posts']))
121: echo '
122: <dt>', $txt['profile_posts'], ': </dt>
123: <dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
124:
125: echo '
126: <dt>', $txt['profile_topics_started'], ': </dt>
127: <dd>', $context['member']['topics'], ' ('. $context['member']['topics_per_day'], ' ', $txt['posts_per_day'], ')</dd>
128: <dt>', $txt['profile_topics_participated'], ': </dt>';[/code
129:
130: // Only show the email address fully if it's not hidden - and we reveal the email.
131: if ($context['member']['show_email'] == 'yes')
132: echo '
.
119:
120: if (!isset($context['disabled_fields']['posts']))
121: echo '
122: <dt>', $txt['profile_posts'], ': </dt>
123: <dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
124:
125: echo '
126: <dt>', $txt['profile_topics_started'], ': </dt>
127: <dd>', $context['member']['topics'], ' ('. $context['member']['topics_per_day'], ' ', $txt['posts_per_day'], ')</dd>
128: <dt>', $txt['profile_topics_participated'], ': </dt>';
129:
130: // Only show the email address fully if it's not hidden - and we reveal the email.
131: if ($context['member']['show_email'] == 'yes')
132: echo '
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /xxxxxxxxxxx/Themes/default/Profile.template.php on line 130
if (!$context['user']['is_owner'] && $context['can_send_pm'])
echo '
<a href="', $scripturl, '?action=pm;sa=send;u=', $context['id_member'], '">', $txt['profile_sendpm_short'], '</a><br />';
echo '
<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '">', $txt['showPosts'], '</a><br />
<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a>
</p>';
echo '
</div>
<span class="botslice"><span></span></span>
</div>
</div>
<div id="detailedinfo">
<div class="windowbg2">
<span class="topslice"><span></span></span>
<div class="content">
<dl>';
if ($context['user']['is_owner'] || $context['user']['is_admin'])
echo '
<dt>', $txt['username'], ': </dt>
<dd>', $context['member']['username'], '</dd>';
if (!isset($context['disabled_fields']['posts']))
echo '
<dt>', $txt['profile_posts'], ': </dt>
<dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
echo '
<dt>', $txt['profile_topics_started'], ': </dt>
<dd>', $context['member']['topics'], ' ('. $context['member']['topics_per_day'], ' ', $txt['posts_per_day'], ')</dd>
<dt>', $txt['profile_topics_participated'], ': </dt>
if (!isset($context['disabled_fields']['topics']))
echo '
<dt>', $txt['topicp'], ':</dt>
<dd>', $context['member']['topics'], ' (', $context['member']['topics_per_day'], ' ', $txt['topics_per_day'], ')</dd>';
// Only show the email address fully if it's not hidden - and we reveal the email.
The line in red is the guilty line. Also would having the Ultimate portal mod installed have anyaffect?
Quote from: Brack1 on July 26, 2010, 07:41:58 PM
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /xxxxxxxxxxx/Themes/default/Profile.template.php on line 130
if (!$context['user']['is_owner'] && $context['can_send_pm'])
echo '
<a href="', $scripturl, '?action=pm;sa=send;u=', $context['id_member'], '">', $txt['profile_sendpm_short'], '</a><br />';
echo '
<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '">', $txt['showPosts'], '</a><br />
<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a>
</p>';
echo '
</div>
<span class="botslice"><span></span></span>
</div>
</div>
<div id="detailedinfo">
<div class="windowbg2">
<span class="topslice"><span></span></span>
<div class="content">
<dl>';
if ($context['user']['is_owner'] || $context['user']['is_admin'])
echo '
<dt>', $txt['username'], ': </dt>
<dd>', $context['member']['username'], '</dd>';
if (!isset($context['disabled_fields']['posts']))
echo '
<dt>', $txt['profile_posts'], ': </dt>
<dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
echo '
<dt>', $txt['profile_topics_started'], ': </dt>
<dd>', $context['member']['topics'], ' ('. $context['member']['topics_per_day'], ' ', $txt['posts_per_day'], ')</dd>
<dt>', $txt['profile_topics_participated'], ': </dt>
if (!isset($context['disabled_fields']['topics']))
echo '
<dt>', $txt['topicp'], ':</dt>
<dd>', $context['member']['topics'], ' (', $context['member']['topics_per_day'], ' ', $txt['topics_per_day'], ')</dd>';
// Only show the email address fully if it's not hidden - and we reveal the email.
The line in red is the guilty line. Also would having the Ultimate portal mod installed have anyaffect?
Try this:
': </dt>
if (!isset($context['disabled_fields']['topics']))
': </dt>';
if (!isset($context['disabled_fields']['topics']))
Woohoo
Well done bud.
(Paints Ha2 green).
Grey makes ya look old.
Quote from: Brack1 on July 26, 2010, 07:41:58 PM
would having the Ultimate portal mod installed have anyaffect?
No
It wasn't until I saw the mod in action that I remembered its job.
;D
When I installed this mod, I got this error:
Template Parse Error!
There was a problem loading the /Themes/default/Profile.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.
You may want to try to refresh this page or use the default theme.
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/default/Profile.template.php on line 130
121: echo '
122: <dt>', $txt['profile_posts'], ': </dt>
123: <dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
124:
125: echo '
126: <dt>', $txt['profile_topics_started'], ': </dt>
127: <dd>', $context['member']['topics'], ' ('. $context['member']['topics_per_day'], ' ', $txt['posts_per_day'], ')</dd>
128: <dt>', $txt['profile_topics_participated'], ': </dt>
129:
130: // Only show the email address fully if it's not hidden - and we reveal the email.
131: if ($context['member']['show_email'] == 'yes')
132: echo '
133: <dt>', $txt['email'], ': </dt>
134: <dd><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a></dd>';
---------------
How does one fix this error?
Now I've got the following error:
Parse error: syntax error, unexpected '<' in .../Themes/default/Profile.template.php on line 118
109: <div id="detailedinfo">
110: <div class="windowbg2">
111: <span class="topslice"><span></span></span>
112: <div class="content">
113: <dl>';
114:
115: if ($context['user']['is_owner'] || $context['user']['is_admin'])
116: echo '
117: <dt>', $txt['username'],': </dt>';
118: <dd>', $context['member']['username'], '</dd>';
119:
120: if (!isset($context['disabled_fields']['topics']))
121: echo '
122: <dt>', $txt['profile_posts'], ': </dt>
----------
How does one fix this? Help!
Sorry for the late reply.
Change line 118 to this:
echo '<dd>', $context['member']['username'], '</dd>';
Hi!
I have the same problem, thanks for your reply. After changing this line i get a new error:
[25-Aug-2010 09:09:01] PHP Parse error: syntax error, unexpected '>' in Themes/default/Profile.template.php on line 118
Ah, and you forgot to change the version 1.6 to 2.0 in the new package. :)
Hello,
Any chance you could put 1.5.4 back on the MOD page? It looks like MODs such as "OS & Browser Detection" and "Reason for editing MOD" fail to install (or uninstall) because of Db Query changes that they can't recognise. I tried to uninstall 1.5.4 but Profile.php and ModSettings.php had problems and without having the 1.5.4 version up to parse and then compare, I can't make the changes needed .
We're still on 1.1.11 and will be for a few months after 2.0 goes Golden, which means we're going to be on 1.1.11 for some time longer. Any help in being able to resolve this, even just putting 1.5.4 back up, would be greatly appreciated.
Grazie,
Cal
smf 2.0.4
install20.xml Modification parse error
Quote from: Snoopix on July 04, 2013, 01:18:43 AM
smf 2.0.4
install20.xml Modification parse error
error...
ok sorted, download 2.1a should fix this :)
Is there a download link anywhere? :P
yeh modsite :P
Quote from: Runic on July 15, 2013, 11:18:57 AM
ok sorted, download 2.1a should fix this :)
that was fast! Thanks
In my mod does not install properly - defeat the system. Maybe it's other add-ons
no works in smf 2.0.7
this code is differente :C
// Otherwise do!
else
{
echo '
<dl class="stats">';
// The labels.
foreach ($context['posts_by_time'] as $time_of_day)
echo '
<dt>', date('g a', mktime($time_of_day['hour'])), '</dt>
<dd class="statsbar">', !empty($time_of_day['posts_percent']) ? '<span class="left"></span><div style="width: ' . $time_of_day['posts_percent'] . 'px;" class="stats_bar"></div><span class="right"></span><span class="righttext">' . $time_of_day['posts_percent'] . '%</span>' : '', '</dd>';
echo '
</dl>';
Can you count the number of topics for a specific board?
;D any chance on an update for 2.0.15?
getting three errors, one is simple fix
Add After ./Sources/Profile-View.php Test failed
it's looking for all of this just to add after
// Posting activity by time.
$result = $smcFunc['db_query']('user_activity_by_time', '
SELECT
HOUR(FROM_UNIXTIME(poster_time + {int:time_offset})) AS hour,
COUNT(*) AS post_count
FROM {db_prefix}messages
WHERE id_member = {int:current_member}' . ($modSettings['totalMessages'] > 100000 ? '
AND id_topic > {int:top_ten_thousand_topics}' : '') . '
GROUP BY hour',
array(
'current_member' => $memID,
'top_ten_thousand_topics' => $modSettings['totalTopics'] - 10000,
'time_offset' => (($user_info['time_offset'] + $modSettings['time_offset']) * 3600),
)
);
$maxPosts = 0;
$context['posts_by_time'] = array();
while ($row = $smcFunc['db_fetch_assoc']($result))
{
// Cast as an integer to remove the leading 0.
$row['hour'] = (int) $row['hour'];
if ($row['post_count'] > $maxPosts)
$maxPosts = $row['post_count'];
$context['posts_by_time'][$row['hour']] = array(
'hour' => $row['hour'],
'posts_percent' => $row['post_count']
);
}
$smcFunc['db_free_result']($result);
if ($maxPosts > 0)
for ($hour = 0; $hour < 24; $hour++)
{
if (!isset($context['posts_by_time'][$hour]))
$context['posts_by_time'][$hour] = array(
'hour' => $hour,
'posts_percent' => 0,
);
else
$context['posts_by_time'][$hour]['posts_percent'] = round(($context['posts_by_time'][$hour]['posts_percent'] * 100) / $maxPosts);
}
// Put it in the right order.
ksort($context['posts_by_time']);
so simply changed for it to just look for
// Put it in the right order.
ksort($context['posts_by_time']);
Add After ./Themes/default/Profile.template.php Test failed
this one I fixed what it was looking for but then got template errors, something about unexpected $context
it wants to find
<dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
but mine looks like this, i'm sure it's probably something I've installed
<dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>' . (!empty($context['member']['anonymous']) ? '
but when it adds
echo '
', $context['tcip_enabled'] && $context['tcip_show_topic_count'] ? '<dt>'. $txt['profile_topics_started']. ': </dt>
<dd>'. $context['member']['topics']. ' ('. $context['member']['topics_per_day']. ' '. $txt['posts_per_day']. ')</dd>
' : '', $context['tcip_enabled'] && $context['tcip_show_participated_count'] ? '<dt>'. $txt['profile_topics_participated']. ': </dt>
<dd>'. $context['member']['topic_count']. '</dd>' : '', '';
I get template errors
lastly I don't know.....
Replace ./Themes/default/Profile.template.php Test failed
instructions are
find
// Otherwise do!
else
{
echo '
<dl class="stats">';
// The labels.
foreach ($context['posts_by_time'] as $time_of_day)
echo '
<dt>', date('g a', mktime($time_of_day['hour'])), '</dt>
<dd class="statsbar">', !empty($time_of_day['posts_percent']) ? '<span class="left"></span><div style="width: ' . $time_of_day['posts_percent'] . 'px;" class="stats_bar"></div><span class="right"></span><span class="righttext">' . $time_of_day['posts_percent'] . '%</span>' : '', '</dd>';
echo '
</dl>';
replace
// Otherwise do!
else
{
echo '
<p align="center"><b>', $txt['tcip_posts'] ,'</b></p>
<dl class="stats">';
// The labels.
foreach ($context['posts_by_time'] as $time_of_day)
echo '
<dt>', date('g a', mktime($time_of_day['hour'])), '</dt>
<dd class="statsbar">', !empty($time_of_day['posts_percent']) ? '<span class="left"></span><div style="width: ' . $time_of_day['posts_percent'] . 'px;" class="stats_bar"></div><span class="right"></span><span class="righttext">' . $time_of_day['posts_percent'] . '%</span>' : '', '</dd>';
echo '
</dl>
<p align="center"><br /><b>', $txt['tcip_topics'] ,'</b></p>
<dl class="stats">';
// The labels.
foreach ($context['topics_by_time'] as $time_of_day)
echo '
<dt>', date('g a', mktime($time_of_day['hour'])), '</dt>
<dd class="statsbar">', !empty($time_of_day['posts_percent']) ? '<span class="left"></span><div style="width: ' . $time_of_day['posts_percent'] . 'px;" class="stats_bar"></div><span class="right"></span><span class="righttext">' . $time_of_day['posts_percent'] . '%</span>' : '', '</dd>';
echo '
</dl>';
I don't have that... I tried to break this apart
find
// Otherwise do!
else
{
echo '
after add
<p align="center"><b>', $txt['tcip_posts'] ,'</b></p>
but i'm not sure about the last part how to edit and add after
my code is
// Otherwise do!
else
{
echo '
<ul class="activity_stats flow_hidden">';
// The labels.
foreach ($context['posts_by_time'] as $time_of_day)
{
echo '
<li', $time_of_day['is_last'] ? ' class="last"' : '', '>
<div class="bar" style="padding-top: ', ((int) (100 - $time_of_day['relative_percent'])), 'px;" title="', sprintf($txt['statPanel_activityTime_posts'], $time_of_day['posts'], $time_of_day['posts_percent']), '">
<div style="height: ', (int) $time_of_day['relative_percent'], 'px;">
<span>', sprintf($txt['statPanel_activityTime_posts'], $time_of_day['posts'], $time_of_day['posts_percent']), '</span>
</div>
</div>
<span class="stats_hour">', $time_of_day['hour_format'], '</span>
</li>';
}
echo '
</ul>';
}
echo '
<span class="clear" />
</div>
<span class="botslice"><span></span></span>
</div>
</div>';
thank you for any help
I have updated this to support SMF 2.1.