Support Forum
Unfortunately it's not as simple as just using the same function from the profile show as it wont work unless it's used on one of the profile templates..
I'm not too sure of any other option if I understand correctly, although hopefully Andy or Steve will chime in if there is..
nope, never... but you could look at the popup profile template and copy the code for the ones there (same as search form but more useable elsewhere) and just put it where you want...
so something like this (completely untested):
global $spProfileUser, $spThisUser; $spProfileUser = $spThisUser; sp_ProfileShowSearchPosts('', __sp('Search User Posts'), __sp('Topics Started'), __sp('Topics Posted In'));
where you want them to show...
Visit Cruise Talk Central and Mr Papa's World
Thanks for your reply Mr. Papa.
I am not very skilled in php, unfortunately!
I tried to add it to the header using the spHeadDesktop.php file. I put it right beneath the section for QuickLinkForum & QuickLinksTopic that I 'turned off".
sp_SectionStart('tagClass=spHeadThree', 'headThree');
sp_SectionStart('tagClass=spPlainSection', 'search');
#sp_QuickLinksForum('tagClass=spControl spRight', __sp('Select Forum'));
#sp_QuickLinksTopic('tagClass=spControl spRight', __sp('New / Updated Topics'));
global $spProfileUser, $spThisUser;
$spProfileUser = $spThisUser;
sp_ProfileShowSearchPosts('', __sp('Search User Posts'), __sp('Topics Started'), __sp('Topics Posted In'));
sp_SearchForm($searchForm);
sp_SectionEnd('', 'search');
sp_SectionEnd('', 'headThree');
It did seem to work, but only on my admin accounts. They are not showing up for my other users.
Also, I would like to remove the "Search User Posts:". When I removed that section of the code ('', __sp('Search User Posts'), ) then the message changed to say: "Topics Posted In:". I would like to get rid of that altogether. Is that possible?
The other thing is that these buttons don't display the same as the others, is that just a CSS adjustment?
Here is a screen shot of what I am talking about. You can see the "Topics Posted In:" message and the buttons are outlined in black and have black font. When you select them, instead of turning a darker blue they turn white.
Thank you for helping me!!!
Where to start!
Firstly, I'm not sure why it would only show up for admins, so will have to wait for Andy or Steve to answer that one..
When removing the labels, you shouldn't remove the section, just the text from within the quotes i.e:
Before:
sp_ProfileShowSearchPosts('', __sp('Search User Posts'), __sp('Topics Started'), __sp('Topics Posted In'));
After:
sp_ProfileShowSearchPosts('', __sp(''), __sp(''), __sp(''));
Note they are two single quotes, not one double.
Lastly, they will not display the same as the other header buttons because they are spSubmits, not spButtons. You could style them differently while keeping the ones in the search form the same by giving the new buttons a different class as an argument such as 'newClass' i.e:
sp_ProfileShowSearchPosts('tagClass=newClass', __sp('Search User Posts'), __sp('Topics Started'), __sp('Topics Posted In'));
That way, you can target them in the stylesheet like:
#spMainContainer #spSearchFormAdvanced .newClass .spSubmit { Your CSS here; }
Although not sure if you'd need the #spSearchFormAdvanced since technically they'd be appearing outside that div, you'd have to experiment. And if you want them to appear the same as the header buttons you could copy the CSS rules from spButton and spButton:hover respectively.
Hope that helps!
1 Guest(s)