SilverWolf
Familiar Face
Hello people! The other admin of our Just Sayin' forum found out how to get the topic titles to show in the "last post" box, along with the name of the last poster. This is exactly what we wanted. However, there is something in the code for this that we do not understand...we are using PHPBB 3.0.8. here is the code:
'LAST_POST_SUBJECT' => (strlen($last_post_subject) > 30) ? censor_text(substr($last_post_subject, 0, 20) . '...') : censor_text($last_post_subject),
What does the code "(strlen($last_post_subject) > 30) ? " actually do? Basically, I would like to know it's function.
Also, what exactly does "$last_post_subject, 0, 20" do? I know that making the last number larger allows more of the title of the last topics to be visible on the index page, but after a certain point (25 or so), it makes the columns on the forum lose their proper alignment.
If someone could explain what the functioning of this code actually is, and how to properly use it, we would GREATLY appreciate it. Thanks :yes:
The forum can be found at: http://www.just-saying.com/community
~SilverWolf~
'LAST_POST_SUBJECT' => (strlen($last_post_subject) > 30) ? censor_text(substr($last_post_subject, 0, 20) . '...') : censor_text($last_post_subject),
What does the code "(strlen($last_post_subject) > 30) ? " actually do? Basically, I would like to know it's function.
Also, what exactly does "$last_post_subject, 0, 20" do? I know that making the last number larger allows more of the title of the last topics to be visible on the index page, but after a certain point (25 or so), it makes the columns on the forum lose their proper alignment.
If someone could explain what the functioning of this code actually is, and how to properly use it, we would GREATLY appreciate it. Thanks :yes:
The forum can be found at: http://www.just-saying.com/community
~SilverWolf~







