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
List View: Unread posts - force newline for spListLabel
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 15, 2012 - 6:24 pm

When I am reading the list view generated by clicking the unread posts icon I want the spListLastPost = spListLabel to start on a new line so that the formatting is always consistent.

What is the best way of doing this - the screen-shot should make it obvious what I would like to do. I would like the Topic Title left justified on one line and then the last post data on the line below. I'm sure this is easy if you know how.

Conrad

Image Enlarger

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 15, 2012 - 7:15 pm

Er... like it is on this site you mean? 🙂
have you changed the template or styling on that to centre it in some way?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 16, 2012 - 3:08 am

Yes of course, in fact in several ways.

                sp_ColumnStart('tagClass=spColumnSection spLeft&width=400px&height=20px');

                sp_ListTopicName('tagClass=spListTopicRowName spLeft', __sp('Browse the thread %NAME%'));

I have added a width parameter which works fine but the sp_ListTopicName with the tag class doesn't seem to work.

Basically I want

  sp_ListTopicName('', __sp('Browse the thread %NAME%'));

To left justify the Topic name so it is consistent with the rest of the site. How?

Conrad

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 16, 2012 - 3:48 pm

But have you changed the CSS in this? For me it does format left correctly so can you work back through changes to see what the cause is?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 17, 2012 - 5:56 am

By the CSS I presume that you mean the sp-list-view-functions.php? I have compared my file with build 7705 which I downloaded and other than the date and truncate settings, there is no difference, so I can't see anything there.

Is there not a brute force way of forcing the 'Last post blah blah....' text from displaying on a new line? It is justifying left correctly but not starting a new line due to the variable title widths. I have made some topic titles deliberately long but truncated to test both the truncate feature and the alignment.

Regards

Conrad

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 17, 2012 - 8:05 am

I still don't not really understand why it doesn't.

Still - the only way to force a div to open beneath everything before it is to issue a clear statement. You will find these liberally used in the templates as an insertbreak function call. You could try inserting one of them before the call to the offending line.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 17, 2012 - 9:46 am

Oh that nearly did it!

Image Enlarger

All I need is for the right arrow to be on the right and for the last post text to align with the topic title on the left. They are off course tied at the moment, spLeft makes both align left with icon first.

So if I can call the spIcon and spPostLink separately that should do it.

Conrad

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 17, 2012 - 11:04 am

Don't think you can cal them separately,.
That looks like either padding or margin to me. What does Firebug have to say?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 17, 2012 - 1:16 pm

Firebug says that if I add spRight to the icon it goes to the right and looks perfect but then the text stays in the same place  with a gap to accommodate the icon. In other words it stilll will not align left and it's driving me as crazy as a box of frogs!

In firebug if I add text-align: left; of course it works fine. The section is span class="spListLabel" , is it possible to pass arguments for each class "spListLabel" and "spIcon" in the array from sp-list-view-functions.php?

    $defs = array('tagId'        => 'spListLastPost%ID%',
                  'tagClass'     => 'spListPostLink',
                  'labelClass'    => 'spListLabel',
                  'linkClass'    => 'spLink',
                  'iconClass'    => 'spIcon',
                  'icon'        => 'sp_ArrowRight.png',
                  'tip'           => 1,
                  'niceDate'    => 0,
                  'date'          => 1,
                  'time'          => 1,
                  'user'          => 1,
                  'echo'        => 1,
                  'get'            => 0,

 Where else is spListView used? Unread Posts, Subscribed Threads, Watched Threads etc so probably not a good idea anyway. I don't like messing with the functions at all.

Conrad

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 17, 2012 - 2:44 pm

1 - what arguments?
2 - the list view is also used for search queries
3 - I still would like to know why your list displays different to mine, It must be down to CSS changes.

andy-signature.png
YELLOW
SWORDFISH
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