Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
View "List Topics You Started" in header
Avatar
Jenn Walker
Member
Free Members
sp_UserOfflineSmall Offline
Apr 30, 2015 - 4:47 pm

It is possible to make a dropdown menu in the header for the topics that you have started and one for the topics you have posted to.  

Or maybe not even a dropdown, but a button on the header, so you don't have to click your profile to see them?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 30, 2015 - 4:55 pm

They ARE in the advanced search form....

andy-signature.png
YELLOW
SWORDFISH
Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Apr 30, 2015 - 5:01 pm

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..

Avatar
Jenn Walker
Member
Free Members
sp_UserOfflineSmall Offline
Apr 30, 2015 - 5:21 pm

Thanks Ike, I would really like to display there on the header somewhere if that is a possibility. 

Andy or Steve is that possible?

Thank you!

Avatar
Jenn Walker
Member
Free Members
sp_UserOfflineSmall Offline
Apr 30, 2015 - 5:22 pm

Yellow Swordfish said
They ARE in the advanced search form....

I would really love it if people could see them right on the header without having to click to find them. Can we use that function and move it to the header?

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Apr 30, 2015 - 5:28 pm

I don't believe so. They are built in to the search form which is called in a single function.

Avatar
Jenn Walker
Member
Free Members
sp_UserOfflineSmall Offline
Apr 30, 2015 - 5:42 pm

What is the chance of creating this code?

It seems hard to believe that no one else has ever asked for this before. 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 30, 2015 - 11:03 pm

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...

Avatar
Jenn Walker
Member
Free Members
sp_UserOfflineSmall Offline
May 1, 2015 - 4:34 pm

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. 

Image Enlarger

 

Thank you for helping me!!!

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
May 1, 2015 - 7:01 pm

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!

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626