Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Ok - Looked in the codex but didn't see sp_PostIndexUserDate
Avatar
Maximillion
Member
sp_UserOfflineSmall Offline
Mar 22, 2012 - 10:25 pm

Doing a little forum editing and want to shift the location of the post date. Noticed when I used the code:

sp_PostIndexUserDate

I seem to be getting a two line response (date on top and time on bottom). Is there a place I can edit so this all displays on a single line instead of two?

Thank you in advance!

-Max

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2012 - 10:40 pm

sure. in 5.0, its all theme driven...  so you need to edit your sp theme you are using...and as always, we strongly recommend that you make your own theme and not edit one of ours (ref: http://codex.simple-press.com/.....g-a-theme/)

you have the right function for the user date...  now just set the options the way you want... the available args and defaults are:

                  'nicedate'        => 0,
                  'date'              => 1,
                  'time'              => 1,
                  'stackdate'        => 1,

nice date prints out stuff like 1 minute ago, 2 days ago...  if nicedate is off, you get a timestamp...  the date and time controls how much data in that timestamp...  stackdate tells whether to stack, ie 2 lines, or not to stack, one line...

we hope to soon get all this type info in the codex on the template tags...  just with the launch of 5.0, time has been short...

Avatar
Maximillion
Member
sp_UserOfflineSmall Offline
Mar 22, 2012 - 10:58 pm

Ahh, OK - so something like this?

 

sp_PostIndexUserDate('tagClass=spLabelBordered spLeft&nicedate=0&date=1&time=1&stackdate=1');
Avatar
Maximillion
Member
sp_UserOfflineSmall Offline
Mar 22, 2012 - 11:04 pm

Maximillion said
Ahh, OK - so something like this?

 

sp_PostIndexUserDate('tagClass=spLabelBordered spLeft&nicedate=0&date=1&time=1&stackdate=1');

By the way - it worked. The final line wa:

sp_PostIndexUserDate('tagClass=spLabelBordered spLeft&nicedate=0&stackdate=0');

 

Thank you!

-Max

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2012 - 11:06 pm

cool. np, glad to help.  will be easier once we get all those tags defined in the codex!

Avatar
Maximillion
Member
sp_UserOfflineSmall Offline
Mar 22, 2012 - 11:21 pm

Yeah - the support has been great and my forums are looking better than ever. Very satisfied with the subscription.

By the way - is there a function or a manner of inserting vertical spacing like a carriage return into a column? I'm messing with Column 1 of the post row (on the spTopicView.php) and I removed the time stamp from the top (I have a forum setup identical to this one). What's happening now is the avatar image is butting right up against the top of Column 1 of the post row.This make sense?

I'm using

sp_InsertBreak();

To try and add a little space and nudge the avatar down. Doesn't seem to be working.

Thoughts?

-Max

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 22, 2012 - 11:29 pm

well, by itself, sp_InsertBreak() really only does a clear on floats... 

you could just insert a <br /> tag but it might be too big...

another option would be to pass a class to the function via:

sp_InsertBreak('tagClass=someClass');

and then style .someClass to have some margin or padding...

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: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625