Great stuff Andy well done, now if I were to actually want the actual time of the most recent post to be displayed, how would I go about that? :ducks:
Support Forum
Grrrrrr! I’d give you the answer if I could as I figured it out. But my dev server with the code is unplugged until further notice. (still painting)
It is a argument though.
Aren’t I helpful? 
You set the ‘nicedate’ parameter to false and set the ‘date’ and the ‘time’ parameters to true (if you wanted them both).
Er forgive my ignorance and some of my time, where might I find these functions and their arguments?
In the Group View the ‘nicedate’ option is used in the function: sp_ForumIndexLastPost()
In the Forum View in the functions: sp_TopicIndexFirstPost() and sp_TopicIndexLastPost()
In the Topic View in the function: sp_PostIndexUserDate()
And in the List View in the function: sp_ListLastPost()
All of these template functions can be found in the relevant view functions file in the /forum/content folder.
And of course all are called from the appropriate templates.
‘nicedate’ is set on as the default. Other options are ‘date’ and ‘time’. So if you wanted to switch from nicedate to both date and time then you could use
...nicedate=0&date=1&time=1...
for example.
For now I just changed the definitions in the array for each function, are you telling me there is an easy way of making a one click choice?
I have a lot to learn as you can tell, but thanks for the advice I have the date and time displayed as I required.
You should never change the function code. You change the parameters in the template call to the function. Parameters are done the say way that Wp does them in their template tags.
The available parameters are listed at the top of each function (these will be documented) and any you want to change from the default you pass in the template where it is called. each parameter requires an ampersand between them. I gave you the string to use in that last post I made. If you look at the templates you will see how this is done.
OK I have reset all the arrays, however I am still confused 
In the forum/content folder there is sp-group-view-functions.php where I can find the function sp_ForumIndexLastPost(). I know now that I should not meddle with the array below it but I can’t seem to find the function call in the templates. I presume that you are referring to the theme templates so if you tell me which file calls the function sp_ForumIndexLastPost() I’ll figure the rest out myself.
Thanks for the lessons by the way. On the plus side if I can figure this stuff out you should be encouraged !
Well the main template file names are consistent with the functions file. As in spGroupView.php. This matches and primarily uses the functions that are found in the sp-group-view-functions.php file. Same for ‘Forum View’ and ‘Topic View’.
if you are still using the iForum theme though, that has a few extras… It also does not use ALL of the template functions as it is a more minimal and experimental theme.
My theme is based on the default theme. I have opened spGroupView.php and I found the sp_ForumIndexLastPost , I did actually look there before asking earlier but had left the () on the end of my search string and my text search didn’t find it – doh! That’s how much of a newbie I am.
Could you just tell me by demonstration how I should modify the following code:
sp_ForumIndexLastPost('tagClass=spInRowPostLink',__sp('Last Post'));
Many thanks
To turn off the nicedate default and turn on date and time you would use these parameters. These are the same as I posted above:
sp_ForumIndexLastPost('tagClass=spInRowPostLink&nicedate=0&date=1&time=1',__sp('Last Post'));
In other words, include any that you want to change the default for.
This is also fairly standard now among WP template tags – this is how theirs work as well.
Great that works and I understand how to do it, just a bit of formatting to sort out now. Old site looks like this
Aug 8, 2011
17.30 pm
by name
Hopefully I should be able to sort that out……….![]()
date and time formatting are determined on the forum admin > Options > Content settings
Actually…. while on the topic. What’s the odds of additional argument to omit the BR tag between date and time?