MyBB Community Forums

Full Version: Last Posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
In new version of last posts I fix many problems
http://mods.mybb.com/view/last-posts
1:Less query
2:AJAX Reload
3Confusedpeed Change
4:Line View
5Big Grinirction change
6ConfusedEO link supported
Big Grin
Great plugin. Can you adjust the amount of seconds it reloads?
Nice, I will test it.
Great plugin. Will for sure use it.


Regards
Praveer
If you mean auto reload it doesn't have I have plan for this job in new version. In this verison just I reduce number of query!
If you have new idea I pleased to hear them!
(2010-07-16, 05:29 AM)Winford F. Wrote: [ -> ]Great plugin. Can you adjust the amount of seconds it reloads?
(2010-07-15, 07:27 AM)Hamed Wrote: [ -> ]6ConfusedEO link supported

Doesn't work with Google SEO... You should use functions like build_profile_link(), get_post_link() and get_thread_link()
All these functions do the hard work for you.
There is option on AdminCP which you can enable it and get SEO url!
Test it please!
(2010-07-16, 04:53 PM)querschlaeger Wrote: [ -> ]
(2010-07-15, 07:27 AM)Hamed Wrote: [ -> ]6ConfusedEO link supported

Doesn't work with Google SEO... You should use functions like build_profile_link(), get_post_link() and get_thread_link()
All these functions do the hard work for you.
This option is pointless, because it only create links like member.php?uid=1 or user-1.html. This is not the way a plugin developer should create links (manually!!!).

Here is an example:

Replace this:
                if($mybb->settings['gseolp'] == "0")
                {
                    $lastposterlink ='<td><img src="images/last/username.png" style="vertical-align: middle;"><a target="_blank" href="'.$mybb->settings['bburl'].'/member.php?action=profile&uid='.$thread['lastposteruid'].'">'.$thread['lastposter'].'</a></td>';
                }
                else
                {
                    $lastposterlink ='<td><img src="images/last/username.png" style="vertical-align: middle;"><a target="_blank" href="'.$mybb->settings['bburl'].'/user-'.$thread['lastposteruid'].'.html">'.$thread['lastposter'].'</a></td>';
                }

With this:

$lastposterlink ='<td><img src="images/last/username.png" style="vertical-align: middle;">'.build_profile_link($thread['lastposter'], $thread['lastposteruid']).'</td>';

The MyBB function build_profile_link() does all the work for you. I repeat: You should use functions like build_profile_link(), get_post_link() and get_thread_link() to build links.
Is there any problem with do it manually?
I did this plugin quickly and just I want to reduce query numbers.
(I am not prof in MyBB plugins sorry!)
(2010-07-17, 09:15 AM)querschlaeger Wrote: [ -> ]This option is pointless, because it only create links like member.php?uid=1 or user-1.html. This is not the way a plugin developer should create links (manually!!!).

Here is an example:

Replace this:
                if($mybb->settings['gseolp'] == "0")
                {
                    $lastposterlink ='<td><img src="images/last/username.png" style="vertical-align: middle;"><a target="_blank" href="'.$mybb->settings['bburl'].'/member.php?action=profile&uid='.$thread['lastposteruid'].'">'.$thread['lastposter'].'</a></td>';
                }
                else
                {
                    $lastposterlink ='<td><img src="images/last/username.png" style="vertical-align: middle;"><a target="_blank" href="'.$mybb->settings['bburl'].'/user-'.$thread['lastposteruid'].'.html">'.$thread['lastposter'].'</a></td>';
                }

With this:

$lastposterlink ='<td><img src="images/last/username.png" style="vertical-align: middle;">'.build_profile_link($thread['lastposter'], $thread['lastposteruid']).'</td>';

The MyBB function build_profile_link() does all the work for you. I repeat: You should use functions like build_profile_link(), get_post_link() and get_thread_link() to build links.
Google SEO links usually look like User-Hamed oder Thread-Last-Posts. When you use the internal MyBB functions to build links you have to do less code work and the links will be build correctly according to SEO setting (or plugin) of the user/admin.
Pages: 1 2