Recent Topics

1 Jun 19, 2005 18:56    

I posted this in another thread where I got the info but I wondered if the lack of response might be down to it being quite an oldish thread. Pls forgive the duplication.

I have taken the step of requiring people to logon or register to comment on all our blogs. http://www.teesblog.co.uk - http://www.tyneblog.co.uk - http://www.wearblog.co.uk - http://www.blogradio.co.uk

This works for my purposes. I used the code posted elsewhere by EdB and it works fine.

This is the stuff

	
<?php
}
echo "You must be logged in to add a comment. Please logon or register now<br />";


if( $disp_comment_form && is_logged_in() )
{   // We want to display the comments form to a registered member:
	      if( $Item->can_comment() )
	      { // User can leave a comment    ?>

I'd like to refine this a little. It would be much more friendly if the Please logon or register now was a link to $admin_url

I've tried all ways to make it happen but sucess has so far eluded me.

here's what I tried

<a href="<?php echo $admin_url ?>"><?php echo T_('Please logon or register now') ?></a>

and here's the context in which I used it

<?php

	}
 echo "You must be logged in to add a comment. <br />";

<a href="<?php echo $admin_url ?>"><?php echo T_('Please logon or register now') ?></a>

	 if( $disp_comment_form && is_logged_in() )

	   {   // We want to display the comments form to a registered member:
	      if( $Item->can_comment() )
	      { // User can leave a comment

		?>


it's something obvious right? :lol:[/url]

2 Jun 19, 2005 20:51

<?php 

   } 
 echo "You must be logged in to add a comment. <br />"; 

<?php user_login_link( '', '','Please logon or register now' ); ?>

    if( $disp_comment_form && is_logged_in() ) 

      {   // We want to display the comments form to a registered member: 
         if( $Item->can_comment() ) 
         { // User can leave a comment 

      ?>

3 Jun 19, 2005 21:22

i get this error

Parse error: parse error, unexpected '<' in /home/release/public_html/teesblog/skins/SP_WARRIOR/_feedback.php on line 138

line 138 is

<?php user_login_link( '', '','Please logon or register now' ); ?>

4 Jun 20, 2005 08:52

<?php 

   } 
 echo "You must be logged in to add a comment. <br />"; 

 user_login_link( '', '','Please logon or register now' ); 

    if( $disp_comment_form && is_logged_in() ) 

      {   // We want to display the comments form to a registered member: 
         if( $Item->can_comment() ) 
         { // User can leave a comment 

      ?>

Offcourse the former code gave an error, because I was opening a <?php in a parent <?php ...

5 Jun 27, 2005 08:56

thanks - finally got round to adding that and it works

however it takes you to the login link which is fine if you are a registered member. What I want is the longon OR register page

this http://neukol.org.uk/teesblog/htsrv/register.php

for instance gives the ability to logon OR Register

I'd rather call it dynamically as I have several blog systems

this does NOT work

	<?php

		   }
		 echo "You must be logged in to add a comment. <br />";

		<a href="http://neukol.org.uk/teesblog/htsrv/register.php">Please Logon or Register Now</a>

		    if( $disp_comment_form && is_logged_in() )



		      {   // We want to display the comments form to a registered member:
		         if( $Item->can_comment() )
		         { // User can leave a comment

      ?>

6 Jun 27, 2005 12:40

On the logon-form, you can see a link to the register form..
if that is not enough, you can alter that link to the registerform, make is a little bigger, put a picture....

7 Jun 27, 2005 12:45

On the logon-form, you can see a link to the register form..

that has been my experience but in this instance it did not appear[/code]


Form is loading...