PEAK XOOPS - would like to display user's name in the <title> of the page that shows all the user's submissions in englishin japanese

would like to display user's name in the <title> of the page that shows all the user's submissions

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2004/11/1 19:09
Luminosity  ¾åÅùʼ   Posts: 21
At the moment, when a user clicks on a category, that category is displayed in the <title>. Thanks to your help from here, I added this code to viewcat.php

$xoopsTpl->assign( 'xoops_pagetitle' , $cat_title) ;

What I would like to do now is to display the user's name in the <title> field of the viewcat.php page displayed when you click on a user and see only their own submissions.

Could this be done somehow like this:

$xoopsTpl->assign( 'xoops_pagetitle' , $uid , $cat_title) ;

If so, what is the PHP variable to display the user's name who's submissions we are looking at? OR could this better be done by adding that line of code into the viewcat template? I still want to retain the ability to display the name of the category in the <title>.
thanks for your help!
Votes:3 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2004/11/10 11:03
GIJOE  ÀèǤ·³Áâ   Posts: 4110
All you have to do is to insert 2 lines.

line 68 in viewcat.php
} else if( $uid != 0 ) {

	// This means 'my photo'
	if( $uid < 0 ) {
		$where = "submitter=$my_uid" ;
		$get_append = "uid=-1" ;
		$xoopsTpl->assign( 'uid' , -1 ) ;
		$xoopsTpl->assign( 'album_sub_title' , _ALBM_TEXT_SMNAME4 ) ;
		$xoopsTpl->assign( 'xoops_pagetitle' , _ALBM_TEXT_SMNAME4 ) ;
	// uid Specified
	} else {
		$where = "submitter=$uid" ;
		$get_append = "uid=$uid" ;
		$xoopsTpl->assign( 'uid' , $uid ) ;
		$xoopsTpl->assign( 'album_sub_title' , "<img src='$mod_url/images/myphotos.gif' alt='' />" . myalbum_get_name_from_uid( $uid ) ) ;
		$xoopsTpl->assign( 'xoops_pagetitle' , myalbum_get_name_from_uid( $uid ) ) ;
	}
	$join_append = "LEFT JOIN $table_cat c ON l.cid=c.cid" ;
	$select_append = ', c.title AS cat_title' ;

} else {
Votes:2 Average:5.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!