Support Forum
hesitant to go down this road because without php and css knowledge could get messy... you will have to edit the core code... let us know if you want to do that... we can try to give you some untested code... then you will have to style it...
Visit Cruise Talk Central and Mr Papa's World
I am comfortable with CSS and don't mind editing php code if you can tell me what to do. I'll be sure to back up first so I don't break anything. [Image Can Not Be Found]
shot in the dark here… find this query in the sf-template-tags-lists.php file, function sf_latest_posts():
$posts = sfdb_select('set', "SELECT post_id, topic_id, forum_id, post_content, post_index, ".sf_zone_datetime('post_date').", ".SFPOSTS.".user_id, guest_name, ".SFMEMBERS.".display_name FROM ".SFPOSTS." LEFT JOIN ".SFMEMBERS." ON ".SFPOSTS.".user_id = ".SFMEMBERS.".user_id ".$where." ORDER BY post_date DESC LIMIT ".$limit);
and change it to
$posts = sfdb_select('set', "SELECT post_id, topic_id, forum_id, post_content, post_index, ".sf_zone_datetime('post_date').", ".SFPOSTS.".user_id, guest_name, user_email, guestemail, ".SFMEMBERS.".display_name FROM ".SFPOSTS." LEFT JOIN ".SFMEMBERS." ON ".SFPOSTS.".user_id = ".SFMEMBERS.".user_id ".$where." ORDER BY post_date DESC LIMIT ".$limit);
and then where you want the avatar to display in that same function, add this:
if ($post->user_id) { $icon = 'user'; if (sf_is_forum_admin($post->user_id)) $icon='admin'; } else { $icon = 'guest'; } $out.= sf_render_avatar($icon, $post->user_id, sf_filter_email_display($post->user_email), sf_filter_email_display($post->guestemail), false, $size);
again, this is completely untested… you will probably want to style this to your liking... there are some threads in our forum about suggested styling for this in other tags that already allow an avatar...
Visit Cruise Talk Central and Mr Papa's World
@ Mr. Papa... if we had a Karma button I'd be clicking the heck out of it right now.
^5
great idea for plugin for 5.0!
Visit Cruise Talk Central and Mr Papa's World
The code you are telling me to replace does not exist in my sf-template-tags-lists.php file. The closest I found is this:
$posts = $wpdb->get_results( "SELECT post_id, topic_id, forum_id, post_content, post_index, ".sf_zone_datetime('post_date').", ".SFPOSTS.".user_id, guest_name, ".SFMEMBERS.".display_name FROM ".SFPOSTS." LEFT JOIN ".SFMEMBERS." ON ".SFPOSTS.".user_id = ".SFMEMBERS.".user_id ".$where." ORDER BY post_date DESC LIMIT ".$limit);
I tried replacing that with what you gave me and got a Fatal Error:
The theme has encountered a problem that it cannot recover from. Please use the following information to try to resolve the problem.
Error Code: php_code_error:1:/problem-with-post-edit-buttonome/storage/public_html/wp-content/plugins/simple-forum/template-tags/sf-template-tags-lists.php:337:Call to undefined function sfdb_select()
Message: A fatal code error occurred.
If you are unable to fix this problem, please copy all the text on this screen and send it to support@ithemes.com.
Debug Data:
Theme
I sincerely appreciate all the help, but even if this step had worked, "where you want the avatar to display in that same function" is not really helpful to me, since I have no idea where to paste the code to make the avatar appear on the left.
Sorry to be such a pain... my client may not want the avatar after all, but they are wondering if there is any way to change the order that the information is displayed, so instead of
username posted topic in forum
date
it would read:
topic in forum
posted date by username
I'm guessing there isn't, but can you please confirm?
This is obviously all over my head... is there anyway of paying someone to do the code customization for us? (This was actually my original intention when I posted in this forum...)
its the right forum for that. lets see if anyone responds...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)