News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Enhance Recent Post

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

Previous topic - Next topic

rumfa

Aha...well..no thanks man. It's you who wrote the code. Good mod. Hopefully it is intergrated in smf2.
I changed and the avatar is visible now. I'll need to wait a bit for the errors. I'll come back tommorrow or so and report if there are any...;) Hopefully i wont get literally hunderds of errors a day :D

Bulakbol

Thanks rumfa. I'll update the package for now. Hope everything works fine now.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

rumfa

It's ok now. No errors any more.

Bulakbol

Cool.  8) I hope I got all bugs swatted. lol
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Bec

Hi Guys,

I just noticed my recent posts are not showing properly.. the section that shows

" Started by xxx - Last post by xxx" is showing one name for both items even though a different person created the post (i.e. a post was created by John but its showing as  Started by Rebecca - Last post by Rebecca).

I am running 1.1.5, has been installed for a while but only noticed this problem now, everything went fine at installation and im running a custom theme... if someone could please advise how to correct this it would be greatly appreciated.

Cheers  :D

Bulakbol

Can you attach your Recent.template.php? Which custom theme are you using?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

AlenNS

Hi, JohnyB!
This mod is great and I would like to suggest you one little edit that I made on my forum.

I've edited this part of Recent.php:

'avatar' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img src="' . (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/noavatar.gif" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />'),

I've removed all of the avatars' width and height controls:

width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'"

With this in Recent.php avatars are stretched and if their size iz smaller then max width or height it looks very bad.
When you remove this part of code avatars are same size like they are on posts.

If you have some time, look at this and please tell me is this change ok and does it could make some problems to your mod.

Regards! :)

ccbtimewiz

Hey JB, I found an error in your modification.

It appears that whenever a member has a large personal text, the left column stretches and the text does not wrap.

Also, here's the polish translation for your mod.

$txt['joined'] = 'Dołączył';

Bulakbol

@AlenNS
  If you are not getting any error, go ahead and use your modification. Which avatar are you having problem with?

    [1] from server (select)
    [2] own picture (http://)
    [3] uploaded image.

@ccbtimewiz
  I tested the mod again (Core theme) and the personal text (max of 50 characters) wrapped around. I am not sure if the first release doesn't wrap but the current one does. Thanks for the Polish translation. I will update the package soon.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

AlenNS

Every avatar is being stretched with this mod. But now, when I remove that parts everything is ok.

Modification.serbian.php
$txt['joined'] = 'На форуму од:';

Modification.serbian-utf8.php
$txt['joined'] = 'Na forumu od';


Bulakbol

Thanks for the translation AlenNs but unfortunately, my editor won't properly display the Modifications string. The utf8 is fine though.

I don't see any reason why your avatar stretches unless your member uses small sized avatars and your setting is large.

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

AlenNS

I don't know either.
I noticed that all avatars are stretched even when they are several pixels smaller then maximum size like you've put in avatar settings.

Is this necessarily:

'avatar' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img src="' . (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/noavatar.gif" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />'), 'posts' => $row['posts'],


I'm using without it and it's ok. With this settings of height and width mod stretches avatar to max height and width that I inflict in avatar options.

Bulakbol

Try it AlenNS.  You might have problem with external avatars but if people have the same problem as yours, then maybe I should modify the mod. But if only couple then they can use your tip.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

AlenNS

I'll research and ask my users about avatars.
I'll tell you later results.

Sudhakar Arjunan

Quote from: JohnyB on May 08, 2008, 04:23:49 AM
@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.

Hi Johnny B, yesterday night i have installed the Avatar on Board.
No words to express my happiness. My forum look so cool now then earlier.  :D

Just now remembered about your other mod. Which we are previously trying and left it.

But i would even like to enhance my recent page also.

Am Using 1.1.5 with DilberMC - Hope Dilber Mc uses only Default Recent.Template page.

Kindly check the attached and help me to Enhance my Recent Post.

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

58tbird

Spectacular mod Johnny B!  Thank you ;)

Bulakbol

@AlenNS
   Thanks for the Serbian translation but unfortunately, I had problem psting the code. I set my text editor to utf8 (w/ or w/o) but still. The utf8 version is ok though.

@asudhakar
  Did you get any error when you tried to install the mod?

@58tbird
   Thank you too for using this mod. :)
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

NYChamps

I installed the package but I don't see any changes at all - did I need to have another version installed first?

What am I missing?

Thanks

Bulakbol

No. If there's no error, you should see the difference when you read your recent posts.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

NYChamps

I don't get it - still nothing

I uninstalled and then re-installed

Is this a normal message when installing/uninstalling?

6.     Execute Modification     ./Themes/default/languages/Modifications.portuguese.php     Skipping file


That is the only thing I see - I'd love to get this to work - I think the idea would a great addition to my Forum.

Advertisement: