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
Formatting questions for the spForumView.php
Avatar
Maximillion
Member
sp_UserOfflineSmall Offline
Mar 23, 2012 - 12:43 am

Couple things I'm looking to do. I'll start by saying my forum layout is currently the same base one as here.

1. I'd like to format this in the column 5 of the forum row to show Last post and the User on the same line with the date under it.

sp_TopicIndexLastPost('iconClass=spIcon spRight&nicedate=1&date=0&time=0&stackdate=0', __sp('Last Post'));

When I mess with it I'm getting some errors and it seems to want to "sit" at the bottom instead of the top of the column. The hoped for result of my adjustments would look something like the attachment in this message.

2. I'd also like to put these icons:

sp_TopicIndexStatusIcons('tagClass=spStatusIcon spCenter', __sp('This topic is locked'), __sp('This topic is pinned'), __sp('This topic has unread posts'));

at the end of the topic header here:

sp_TopicIndexName('tagClass=spRowName', __sp('Browse the thread %NAME%'));

so they show up all nice and neat right after the correct topic

I attached a sample file of what the intended look would be....

example.gifImage Enlarger

Once again - any help appreciated!

Thank you in advance.

-Max

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 23, 2012 - 7:52 am

Give me a little time and I will get back to you.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 23, 2012 - 9:15 am

To get the status icons where you want them (although they may need a little CSS adjustments afterwards) move the status icon call to beneath the forum name call and add an spLeft class to each. So this becomes:

sp_TopicIndexName('tagClass=spRowName spLeft', 'Browse the thread %NAME%');
sp_TopicIndexStatusIcons('tagClass=spStatusIcon spLeft', 'This topic is locked', 'This topic is pinned', 'This topic has unread posts');

To get the user name on the same line as the 'Last Post' label add the stackuser argument set to zero so this becomes (using the default theme as an example):

sp_TopicIndexLastPost('iconClass=spIcon spRight&nicedate=1&date=0&time=0&stackdate=0&stackuser=0', 'Last Post');

and that should do it. Oh - and remove the items you do not want of course.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Maximillion
Member
sp_UserOfflineSmall Offline
Mar 23, 2012 - 9:52 am

Thank you kindly Andy.

I'll give it a spin when I'm home.

-Max

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2012 - 10:37 am

please let us know...

Avatar
Maximillion
Member
sp_UserOfflineSmall Offline
Mar 23, 2012 - 9:55 pm

All right!

Everything worked ace. I did have a question about the little arrow in the "Last Post" column. It's the one which jumps you directly to the last post itself.

1. Can you point me to the code for that little bit of kit?

2. What is the functionality to turn it on and off?

Thank you again!

-Max

Avatar
Maximillion
Member
sp_UserOfflineSmall Offline
Mar 23, 2012 - 10:43 pm

Also - and this is just one of those little things. Each column has a format for pixel height. What does that exactly regulate?

 

sp_ColumnStart('tagClass=spColumnSection spLeft&width=66%&height=50px');

 

Thank you!

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

the first and last post columns template tag code is in the sp-forum-functions.php...  If you explain what you want to do, would could help...

are you wanting to remove the arrow and link to the topic???  not sure of the point of having the column if you dont want the link, but you look for template tag sp_TopicIndexFirstPost()...  several options to remove...

linkClass argument specifies the class for the link... you could set to a class that has display:none...

iconClass argument specifies the class for the image... again, could set to class to not display...

icon argument is the image itself...  if you specified empty string, it might not display any image or link (have not tried)..

but again, not sure what you really want to do...

the height specification turns into a min-height styling for each column... its just a way, short of using tables, to make sure that each column in a row is the same height and maintain alignment...  if you want a taller row, just increase...

Avatar
Maximillion
Member
sp_UserOfflineSmall Offline
Mar 24, 2012 - 1:05 am

OK, I am following you - I think what was throwing me was the fact the current copy of the forums sheet I am working with looks like this.

 

                        # Column 5 of the forum row
                        # ----------------------------------------------------------------------
                        sp_ColumnStart('tagClass=spColumnSection spRight&width=24%&height=50px');
                        sp_TopicIndexLastPost('iconClass=spIcon spRight&nicedate=1&date=0&time=0&stackdate=0&stackuser=0', 'Last Post');
                        sp_ColumnEnd();

I think I am understanding that the sp_TopicIndexLastPost is the thing happening and all the rest is just how I am seeing that information displayer (icon, timestamp, etc). Makes total sense now, I think I was looking too hard.

OK - so could I use the argument sp_TopicIndexLastPost and:

1. Remove the little arrow

2. Have the words "Last Post" become the link to the last post (with associated 'last post' pop-up)?

That's kind what I'm after.

-Max

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 24, 2012 - 1:17 am

well. sp_TopicIndexLastPost() is the template tag... the arguments would be:

'iconClass=spIcon spRight&nicedate=1&date=0&time=0&stackdate=0&stackuser=0'

and

'Last Post'

I was suggesting you could additional arguments to control the image and link...  if you look at that function in the simple-press/forum/content/sp-forum-view-functions.php file, you could see the other arguments, such as linkClass, iconClass and icon to control the image and link...

however, the label 'Last Post' is just that.. a text label... you will not be able to make it a link...  at least not by using that template tag... but of course, the template file is but a php file so you could do whatever you want directly in php...  and if you want to get this exotic, you will need to do that...

I would simply look at the template function and copy the very small segment of code needed directly into your template file and replace the template tag call... 

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