Support Forum
Is it possible to something like a span by modifying the parameters of something like sp_PostIndexUserStatus?
I would like to display the status after a user's name on the same line.
Update: that was actually a stupid question to ask. So let me change it to a better one:
Can sp_PostIndexUserDate be used to add a label using _SP, like:
sp_PostIndexUserDate('tagClass=spPostUserDate&stackdate=0 spLeft', __sp('Last Visit: %DATE%'));
That doesn't seem to work and I haven't yet gone on a search for the function.
still not sure I follow you...
where are you wanting to do this? everywhere there is a user name displayed? or specific location?
you can 'concatenate' two template tags if you like by doing them one after the other... if you change both container divs to have style of display:inline they will appear next to each other...
Visit Cruise Talk Central and Mr Papa's World
I am going for the "stacked" look for a wider content area. It fits my long-winded tendencies better
http://www.wpperform.com/forum.....gins-work/
In the spInfoSection, I want to add Last Visit: before the date of the last visit. But doing that to sp_PostIndexUserDate using an approach similar to other functions doesn't work, as you can see on the link. The date displays, but no label.
Does that clarify?
The sp_PostIndexUserDate() template tag has no label parameter so your first notion will never work.
But in the actual templat where you make the call you can place any php or html anywhere you want it. So at the most basic you could do something like:
echo 'Last Post ' . sp_PostIndexUserDate('get=1');
as an example.
YELLOW
SWORDFISH
|
I would start by going back to the SP supplied stacked theme and looking in spTopicView.php and see how it is done there.
IE:
sp_ColumnStart('tagClass=spInfoSection spLeft&width=30%&height=60px');
sp_SectionStart('tagClass=spLeft', 'user-dates');
echo '<span class="spPostUserDate">'.__sp('Last Visit').': </span>';
sp_PostIndexUserDate('tagClass=spCenter spPostUserDate&stackdate=0');
sp_PostIndexUserRegistered('tagClass=spPostUserRegistered spCenter', __sp('Member Since: %DATE%'));
sp_PostIndexUserPosts('tagClass=spPostUserPosts spCenter', __sp('Forum Posts: %COUNT%'));
sp_SectionEnd('', 'user-dates');
sp_ColumnEnd();
You can then move the info around, up down or change the width of that column as needed to match your layout.
The code shown should show you something like this which sounds like what you are wanting.
Last Visit: December 19, 2011 - 9:03 pm
Member Since: September 12, 2011
Forum Posts: 10
From there you could add this just about anywhere in spTopicView.php
echo '<span class="spPostUserDate">'.__sp('Last Visit').': </span>';
sp_PostIndexUserDate('tagClass=spCenter spPostUserDate&stackdate=0');
@Yellow Swordfish, Without making a lot of changes to the CSS, that didn't quite work.
@Brandon, Thanks for the suggestion. I had already looked at other samples. My question was not so much about how to display the date as to how to position it.
It turns out my problem was the extra markup added by sp_SectionStart and spSectionEnd. If I kept all of the code with a sp_ColumnStart and sp_ColumnEnd, I am fine. You can see the work in progress here:
Thanks, Yellow Swordfish.
Btw, I was using the css only theme as a starting point. You may want to check on that theme's css-only.css:
Line 383 - inherit is mis-spelled as inheit, which causes the intended font family selection to break
Line 1892 - double ; at the end
I've made a lot of changes since your last post. I'm not 100% done, and I have not tested options or settings which I have disabled. Any feedback, particularly in the area of readability, is appreciated.
corrections made in css only theme... thanks...
feedback? too much white space and not enough borders...
just kidding... looking good... will add one thing though... the text labels (and image) in your buttons seem to have dropped a few pixels and are not centered vertically...
Visit Cruise Talk Central and Mr Papa's World
I've been taking a quarter out of jar for every 1px of border I remove. Pretty soon I'll be calling you. I'll have enough to go on a nice cruise.
Good eye for picking up on the buttons. The buttons are 1 area where I haven't spent much time. The jury is still out on whether I should use CSS gradients on them. My quick take is that CSS gradients can work over bigger spaces, but in small ones, handcrafted gradients from Photoshop look better. I also want to make that consistent with my overall theme. SPF has the most buttons in one place, so I'll figure out my preference on the forum and let that carry the day elsewhere.
1 Guest(s)