News:

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

Main Menu

Enhance Recent Post

Started by Bulakbol, April 08, 2008, 01:03:14 AM

Previous topic - Next topic

Bulakbol

Quote from: Kimmie on April 12, 2008, 03:00:18 AM
well I had both the screenshots up side by side and didnt see that other part. I wasnt drinkin but maybe I should.lol.


haha Maybe you should drink. lol The recent page isn't much used but I am using it all the time so I decided to add the avatar of poster and some info on the left side of the message. 
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Sudhakar Arjunan

Quote from: JohnyB on April 10, 2008, 05:36:49 PM

Hi asudhakar. Just use the package manager and install the mod. If all test passed, continue the installation. If you are using custom theme and don't have its own Recent.template.php, then you don't have to edit anything. If your theme have its own Recent.template.php or test failed on other files then you have to install the mod manually. If you don't know much about php, attach the files that failed the test and I'll try to help you editing them.



Database Error
Not unique table/alias: 'pg'
File: /home/itacumen/public_html/forum/Sources/Recent.php
Line: 411

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.4, while your database is at version 1.1.1. The above error might possibly go away if you execute the latest version of upgrade.php.

Checkout @ http://forum.itacumens.com/index.php?action=recent

Use Dilber Mc Theme - but it uses only default recent template.
I had installed it manually.

Thanks in Advance,
Sudhakar, Admin
www.itacumens.com
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Bulakbol

Hi asudhakar. You probably missed a code or codes. Please post or attach your Sources/Recent.php for now. I would like to check it. Thanks for trying this mod.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Sudhakar Arjunan

Quote from: JohnyB on May 07, 2008, 05:06:20 AM
Hi asudhakar. You probably missed a code or codes. Please post or attach your Sources/Recent.php for now. I would like to check it. Thanks for trying this mod.

Sure JohnyB, Checkout the Attached file.

Kindly help us to overcome the error.

Thanks in Advance,
Sudhakar, Admin
www.itacumens.com

Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Bulakbol

Hi asudhakar. Try this edited Recent.php. I removed the two excess lines. Let me know if you still have problem. Thanks.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Sudhakar Arjunan

Hi Respected JohnyB,

i had Replaced the file and found the recent page is working fine.

http://forum.itacumens.com/index.php?action=recent

But check out the error which is shown at the top of all the pages .

Error - Shows -  - Top of all pages
Error - Shows joined as 1969 to all members
Error - Does not shows our avatars or photos.

Kindly check out and help us JohnyB

Thanks in Advance,
Sudhakar, Admin
www.itacumens.com
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Bulakbol

Hi asudhakar. Please attach your Recent.template.php. I'll check that one too.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Sudhakar Arjunan

Sure, i have attached it and one more thing is while i installed thru package manager - i got errors.

So i manually Modified it .

And while modifying recent template i have removed one pair of lines, which i found to be of other mod's function.

But i have took it out just form checking this Mod. So if possible kindly checkout  this code and attach to it if possible.


<td class="catbg" colspan="3">
<span class="middletext"> ', $txt[109], ' ' . $post['first_poster']['link'] . ' - ' . $txt[22] . ' ' . $txt[525] . ' ' . $post['poster']['link'] . ' </span>
</td>
</tr>
<tr>
<td class="windowbg2" colspan="3" valign="top" height="80">';
if ($post['poster']['theme'] == $context['user']['theme_id'])
$color = !empty($post['poster']['post_color']) ? $post['poster']['post_color'] : (!empty($post['poster']['group_color']) ? $post['poster']['group_color'] :
(!empty($post['poster']['post_group_color']) ? $post['poster']['post_group_color'] : ''));
else
$color = '';
echo '<div class="post" style="color: '. $color . ';">', $post['message'], '</div>
</td>
</tr>';


Check the current modified page in attachement.

Thanks in Advance,
Sudahkar, Admin
www.itacumens.com
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Bulakbol

#28
I'll get back to you asudhakar.

<edit>

Asudhakar, there's a conflict in Recent.php. What other modes have you installed that modified the Recent.php? And also, update your SMF to 1.1.5.  I have to check your Recent.php because of the conflict.

</edit>

<edit2>
Try this one again asudhakar. There's nothing wrong with your Recent.template.php. It's in the Recent.php.
</edit2>

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Sudhakar Arjunan

Quote from: JohnyB on May 07, 2008, 06:32:16 AM
I'll get back to you asudhakar.

<edit>

Asudhakar, there's a conflict in Recent.php. What other modes have you installed that modified the Recent.php? And also, update your SMF to 1.1.5.  I have to check your Recent.php because of the conflict.

</edit>



Okie Sure JohnyB and will update my forum and then i will attach the recent.php file

Because i have some prob in upgrading it.

Since it shows error in ssi file.

Anyhow thank for your support, will let you know after completing it.

Thanks & Regards,
Sudhakar, Admin
www.itacumens.com
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Bulakbol

Asudhakar, try the Recent.php that I attached to my last post.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Sudhakar Arjunan

Hey just look at the errors.

Forum Error log is overloaded in minutes.

help Us, please.

The_Big_S    Today at 22:23:45
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent;start=90
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:45
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent;start=90
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:45
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent;start=90
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:45
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent;start=90
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:45
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent;start=90
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:45
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent;start=90
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:45
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent;start=90
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:45
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent;start=90
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:45
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent;start=90
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:45
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent;start=90
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:32
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:32
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:32
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:32
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73

Apply Filter: Only show the error messages of this member The_Big_S Today at 22:23:32
Apply Filter: Only show the error messages of this IP address 122.164.241.197    Apply Filter: Only show the error messages of this session 1ca8baab04c325ea20fa2f10385d43e0
Apply Filter: Only show the error messages of this URL http://forum.itacumens.com/index.php?action=recent
Apply Filter: Only show the errors with the same message
8: Undefined index: post_group
File: /home/itacumen/public_html/forum/Themes/default/Recent.template.php (main sub template - eval?)
Line: 73


Hell a min of 130 errors per minute.

Thanks in Advance,
Sudhakar, Admin
www.itacumens.com
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Sudhakar Arjunan

Sorry Thank you for this excellent Mod.

I had manually removed all the codes in all the pages.

Even i had removed it from Our package.

I have only one query for you to help

in the top of the forum i could see a small error like this "  "

That to only in this particular page alone : http://forum.itacumens.com/index.php?action=forum

Could you please help me to clear it out please.

Thanks in Advance,
Sudhakar, Admin
www.itacumens.com
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

ccbtimewiz

Lol, the most common error where this appears is if you have text outside <?php and ?>

<?php

{your template stuff}

?>



Bulakbol

Have you resolved your issue asudhakar? Like ccbtimewiz stated, the php tag (?>) should be in the last  line. Check your default/languages/Modifications.{language}.php.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Sudhakar Arjunan

Yes JohnyB as per your suggestions, i have went thru all pages.

Found the error in the Sources/Recent.php file.

Removed and its fine now.

But i had completely removed the recent mod.

Could you please comeup with a good solution for it as soon JohnyB

Thanks in Advance,
Sudhakar, Admin
www.itacumens.com
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

Bulakbol

@Asudhakar.  The mod edit only the Sources/Recent.php and default/Recent.template.php. You properly installed the Recent.template.php but the Recent.php was edited wrong. If you want to install this mod, attach your current unedited Recent.php and Recent.template.php and I'll do the edit for you.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

edi67

CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

rumfa

I get some errors too. In the recent window, the avatars are not showing and i get error

8: Undefined index: filename
Datoteka: /*******/Sources/Recent.php
Line: 402

The code is

$context['posts'][$row['ID_MSG']] = array(
'id' => $row['ID_MSG'],
'counter' => $counter++,
'category' => array(
'id' => $row['ID_CAT'],
'name' => $row['cname'],
'href' => $scripturl . '#' . $row['ID_CAT'],
'link' => '<a href="' . $scripturl . '#' . $row['ID_CAT'] . '">' . $row['cname'] . '</a>'
),
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bname'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bname'] . '</a>'
),
'topic' => $row['ID_TOPIC'],
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'],
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '">' . $row['subject'] . '</a>',
'start' => $row['numReplies'],
'subject' => $row['subject'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'num_views' => $row['numViews'],
'first_poster' => array(
'id' => $row['ID_FIRST_MEMBER'],
'name' => $row['firstPosterName'],
'href' => empty($row['ID_FIRST_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'],
'link' => empty($row['ID_FIRST_MEMBER']) ? $row['firstPosterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_FIRST_MEMBER'] . '">' . $row['firstPosterName'] . '</a>'
),
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'is_guest' => $row['ID_MEMBER'] == 0,
'gender' => array(
'name' => $gendertxt,
'image' => !empty($row['gender']) ? '<img src="' . $settings['images_url'] . '/' . ($row['gender'] == 1 ? 'Male' : 'Female') . '.gif" alt="' . $gendertxt . '" border="0" />' : ''
),
'group' => $row['groupName'],
'group_color' => $row['group_color'],
'post_group' => $row['post_group_name'],
'post_group_color' => $row['post_group_color'],
'stars' => !empty($row['stars'][0]) && !empty($row['stars'][1]) ? str_repeat('<img src="' . $settings['images_url'] . '/' . $row['stars'][1] . '" alt="*" border="0" />', $row['stars'][0]) : '',
'group_stars' => !empty($row['group_stars'][0]) && !empty($row['group_stars'][1]) ? str_repeat('<img src="' . $settings['images_url'] . '/' . $row['group_stars'][1] . '" alt="*" border="0" />', $row['group_stars'][0]) : '',
line 402 - 'avatar' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar" border="0" />'),
'posts' => $row['posts'],
'karma' => array(
'good' => $row['karmaGood'],
'bad' => $row['karmaBad'],
),
'blurb' => $row['personalText'],
'location' => $row['location'],
'title' => !empty($modSettings['titlesEnable']) ? $row['usertitle'] : '',
'online' => array(
'is_online' => $row['is_online'],
'text' => &$txt[$row['is_online'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['is_online'] ? 'useron' : 'useroff') . '.gif',
),
'registered' => empty($row['dateRegistered']) ? $txt[470] : timeformat($row['dateRegistered']),
'registered_timestamp' => empty($row['dateRegistered']) ? 0 : forum_time(true, $row['dateRegistered']),
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'message' => $row['body'],
'can_reply' => false,
'can_mark_notify' => false,
'can_delete' => false,
'delete_possible' => ($row['ID_FIRST_MSG'] != $row['ID_MSG'] || $row['ID_LAST_MSG'] == $row['ID_MSG']) && (empty($modSettings['edit_disable_time']) || $row['posterTime'] + $modSettings['edit_disable_time'] * 60 >= time()),
);

if ($ID_MEMBER == $row['ID_FIRST_MEMBER'])
$board_ids['own'][$row['ID_BOARD']][] = $row['ID_MSG'];
$board_ids['any'][$row['ID_BOARD']][] = $row['ID_MSG'];
}
mysql_free_result($request);


Avatars are custom uploaded form the members in the custom folder "slike_clanova" What could it be?

Bulakbol

Hi rumfa.  You probably found a bug.  :P Could you please try this. In Sources/Recent.php, find
mem.dateRegistered, mem.location, mem.showOnline, mem.personalText, t.ID_FIRST_MSG, at.ID_ATTACH, at.attachmentType,

and replace with
mem.dateRegistered, mem.location, mem.showOnline, mem.personalText, t.ID_FIRST_MSG, at.ID_ATTACH, at.attachmentType, at.filename,

I just added " at.filename," at the end. I think I missed it. Thanks a lot.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Advertisement: