Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 41

Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 170
Last Entry by 'Name' - Macrotone Forum

Unknown Error 8192: KunenaControllerApplicationDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in libraries/kunena/controller/application/display.php on line 21


Unknown Error 8192: Automatic conversion of false to array is deprecated in libraries/kunena/route/route.php on line 437


Unknown Error 8192: ComponentKunenaControllerWidgetAnnouncementDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/widget/announcement/display.php on line 18


Unknown Error 8192: ComponentKunenaControllerTopicItemDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/topic/item/display.php on line 25


Unknown Error 8192: Automatic conversion of false to array is deprecated in libraries/kunena/forum/category/category.php on line 415


Unknown Error 8192: Automatic conversion of false to array is deprecated in libraries/kunena/bbcode/bbcode.php on line 107

Last Entry by "Name"


Unknown Error 8192: ComponentKunenaControllerTopicItemActionsDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/topic/item/actions/display.php on line 23


Unknown Error 8192: ComponentKunenaControllerTopicPollDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/topic/poll/display.php on line 21


Unknown Error 8192: ComponentKunenaControllerTopicItemMessageDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/topic/item/message/display.php on line 23

7 years 10 months ago - 7 years 10 months ago #1 by Captainmoomoo

Unknown Error 8192: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in libraries/kunena/external/nbbc/src/BBCode.php on line 2263

Hello again, I am trying to get the index in Rialto to display the first and last name of the user, rather than his/her username. Is there a piece of code I can edit to display the full name instead?

I took a look at default.php (in com_rialto>views>index>tmpl) and made a few changes to at least get the user id to display. The code I edited shown below. I'm not sure what I'm doing wrong... Thank you for any support you can give.
<td align="center" class="rialtoIndexViewTableRowLastEntry">
  <?php
    if ( $category->last_entry_date == "") {
      echo "-";
        } else { // entry found
          $_username = $cHelper->getUsernameById( $category->last_entry_user_id);
          // Next line displays users ID
          //$_username = ( $category->last_entry_user_id);
            echo "<table width='100%' cellspacing='0' cellpadding='0' border='0' class='noborder'>";
            echo "<tr>";
            echo "<td align='center' valign='center' class='noborder'>";
            echo $category->last_entry_date;
            echo "<br />";
            echo JText::_( 'COM_RIALTO_BY' ) . "&nbsp;";
            echo "<b>";
            //echo $_username;
            // Removes characters in usernames
            echo $_username = preg_replace('/[.,]/', ' ', $_username);
            echo "</b>";
            echo "</td>";
            echo "</tr>";
            echo "</table>";
        }
  ?>
</td>

Unknown Error 8192: ComponentKunenaControllerMessageItemActionsDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/message/item/actions/display.php on line 25

Please Log in or Create an account to join the conversation.

7 years 10 months ago #2 by geoffc
Replied by geoffc on topic Last Entry by "Name"
Names are a little strange (to my mind) in Joomla. Basically when one registers to Joomla one supplies a 'name' and a 'username'. The username is used for when one logs in to the site. The 'name' can really be anything and isn't really used as a 'true name' as such. Many people tend to use either the same text as the 'username' or just a one word title. It is often not a real 'name' at all.

Rialto tries to split the Joomla name' into the 'firstname' and 'lastname' which is then used in its displays, but there is no guarantees that they are 'real names' even then. Hence the use of the username in the displays etc.

There are two possibilities. a) Get the 'name' from the Joomla users table or b) Get the firstname and lastname fields from the Rialto users table. Either is best server by a small helper routine to access the appropriate table and return a value which is then displayed.

Which is most suitable for your site?
There may be a small delay on a response since I am currently chasing a problem caused by googlecode closing down resulting in us having to modify another component.

Regards
Geoff
The following user(s) said Thank You: Captainmoomoo

Please Log in or Create an account to join the conversation.

7 years 10 months ago #3 by Captainmoomoo
Replied by Captainmoomoo on topic Last Entry by "Name"
I got it to work! I passed the ID for the users into $user = JFactory::getUser($_username); and then printed out $user->name.

I was initially thinking about passing in the first and last name in as a placeholder, but I don't think that would work well. The first and last names of the users wont change for my website, as the website pulls the user's information from an Active Directory (AD). I'm sure a lot of people who use this plugin would not want to reveal personal information; but for my case, it is needed. Thanks again geoffc!

Please Log in or Create an account to join the conversation.

7 years 10 months ago - 7 years 10 months ago #4 by geoffc
Replied by geoffc on topic Last Entry by "Name"
Good solution.
Remember it would need to be in a template override otherwise the change would be lost on an update. :) .

Regards
Geoff

Please Log in or Create an account to join the conversation.

Time to create page: 0.140 seconds
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries