The search and replace for the first item in your code breaks the php code. That is a string replace for your home page url that removes the end slash. However, because the register page is also an is_home it provides the exclusion for this url. What you have done will break the first part of the code. To fix this on you need to know that actual url that is generated from your new piece of code and then insert it into where 'wp-signup.php' occurs in the first item. From the link that was generated it would appear that this should be 'signup-fca'
As per the instructions in the plugin, it states:
"Checking this option will disable the wp-signup.php form and change the signup url automatically every 24 hours. It will look something like http://comunidadespr.com/signup-XXX/."
If I insert the link as you suggests, that means that after 24 hours, the link will not work since another one will be generated in the fly.
I'm not too familiar with the plugin you are using but I am pretty good with php and the way that you coded it initially you placed a php call inside of another php call, which doesn't work well. The two options I have listed above should both work. I prefer the second one just as a matter of coding preference.
Hey wlpdrpat,
Thanks again. Unfortunately that doesn't worked. I tried both codes.
The effect of both codes suggested, is that the generated url is displayed (out the area where it is suppossed to be) and without a link. It is displayed below the pages link and removed part of the template.
In the Create a new account link, it still displays the long incorrect url.
Nice try. Thanks.
OK. I have looked at the code you provided originally to see what it purposes is (initially, I was just trying to help you write proper code). The first line of code:
The purpose of this is to do a string replace searching for / in the string REQUEST_URI and replacing it with nothing then comparing the result to ensure that it is not wp-signup.php or register. If it meets all these requirements then it will display what follows this php call, which is signified by the open bracket at the end of the call: "{" Using your replacement code here replacing wp-signup.php for ust_wpsignup_url() will not have much of an effect because it will be using an absolute url to compare.
In other words placing your ust_wpsignup_url() in the first piece of code is not the problem as this is just a comparative analysis to decide whether or not to display the code that follows it.
This is because the second part of the code is designed to generate a relative link to either register if you are using bp or wp-signup if not:
/<?php if( $bp_existed == 'true' ) { //check if bp existed ?>register/<?php } else { ?>wp-signup.php<?php } ?>
Notice the leading / before the php call above. This is designed to generate a relative link. Messy, messy, messy! Of course, this is because the skin is designed to work with either bp or wp. However, this is the problem. When you replace wp-signup.php with ust_wpsignup_url() in this part of the code you end up with the http://comunidadespr.com/http://comunidadespr.com/signup-b8e/ because this is designed to provide a relative link.
Of course I am not sure why there is a hanging close paragraph following this code and this may be the reason you are seeing the url under your menu. However, reverting it to its original should work.
and try this for the second code:
<div id="intro-package">
<div id="edublog-free"><h3>Añada Su Comunidad En Segundos. Es Gratis!</h3><p><?php if( $bp_existed == 'true' ) { //check if bp existed ?>/register/<?php } else { ?><?php ust_wpsignup_url(); ?><?php } ?>" title="Get yourself a free blog">Unase Ahora!</p></div>
</div>
Reverted to original. Then replaced code as suggested. Still dont work. The link text/contents is displayed but without the link, and the "Create a new account" link in the form still displays the long incorrect link.
Don't know if this is important, but here it goes: I just noticed that I'm using The Edublogs Homepage Theme ver 2.1.3 and the current one is ver 2.1.8. However, I don't want to upgrade since I'm afraid of losing work done on it.
I appreciate your time and effort, but it's time someone from WPMUDEV helps us here.
Your mod solved the issue of the signup link located in the box. Thanks a lot!
Now I have to figure out how to solve the same issue in the link that says "Create a new account". That link still points to the long/incorrect url here:
Sorry for the confusion here. <?php ust_wpsignup_url(); ?>
prints the entire link, so you need to replace the entire link with it so <a href="http://comunidadespr.com/wp-signup.php">
will be <a href="<?php ust_wpsignup_url(); ?>">
Could you print the current code? Since you've re-installed WP I'm guessing it could look different. It looks like you have not removed enough code when you tried to replace the signup link. If you show me the code I'll do my best to explain.
The intructions from the plugin are clear but DOES NOT WORK.
It would be great to just rewrite the instruction in a way that dummies can follow.
I tried to follow this instructions:
Checking this option will disable the wp-signup.php form and change the signup url automatically every 24 hours. It will look something like http://drydot.com/signup-XXX/. To use this you may need to make some slight edits to your main theme's template files. Replace any hardcoded links to wp-signup.php with this function: <?php ust_wpsignup_url(); ?> Within post or page content you can insert the [ust_wpsignup_url] shortcode, usually in the href of a link. See the install.txt file for more detailed documentation on this function
Is it possible that it's within PHP tags? Check so that there's a ?> before the line where you are currently having this html code. If there's not, add it before that line and add <?php after it. If you're not sure what that is, just post more code here so that I can see what's before and after the piece of code that you just posted.
short code don't work with me too. OR It about theme. I use Edu Clean Theme same renato123. And i try to use...
1. <a href="[ust_wpsignup_url]">Signup Now</a>
2. ust_singup_url()
at header.php, I still don't work.
renato123, I found your solved problem at "Añada Su Comunidad En Segundos. Es Gratis!UNASE AHORA!" Please suggest me what code that you use in this area.
I used the following code in the page content or into the post:
<a href="[ust_wpsignup_url]">Signup Now</a>
It DOES NOT WORK "inside of other plugin"
Unfortunately there are no support for paid members, we have to rely in each other to solve these problem, what seems unfair and after pay for one year subscription I fell being riped off by these scammers...
I think, i can solved problem in Sign Up area on header.php but i still can't solve short code in post/page, I think it have problem with Edu Clean Theme.
Let me record, How to change header.php (of Edu Clean Them only) for Anti-Splog.
1. Open header.php and search /wp-signup.php that you will found at line number...111, 245, 255, 257 (some time not same me don't mine please compare with this code)
111 <?php if (strstr($_SERVER['REQUEST_URI'], '/wp-signup.php')) { ?>
245 <?php if( is_home() && !strstr($_SERVER['REQUEST_URI'], '/wp-signup.php') ) { ?>
255 <?php if ( !strstr($_SERVER['REQUEST_URI'], '/wp-signup.php?action=register') ) { ?>
257 <div id="edublog-free"><h3><?php _e("Get started in seconds for free",TEMPLATE_DOMAIN); ?></h3><p><a href="<?php echo home_url(); ?>/<?php if( $bp_existed == 'true' ) { //check if bp existed ?><?php echo bp_get_root_slug( 'register' ) . '/'; ?><?php } else { ?>wp-signup.php<?php } ?>" title="<?php _e("Get yourself a free blog",TEMPLATE_DOMAIN); ?>"><?php _e("Join Here!",TEMPLATE_DOMAIN); ?></a></p></div>
Replace all /wp-signup.php with <?php ust_wpsignup_url(); ?>
2. At line number 257 change it to 257 <div id="edublog-free"><h3><?php _e("Get started in seconds for free",TEMPLATE_DOMAIN); ?></h3><p><a href="<?php echo home_url(); ?>" title="<?php _e("Get yourself a free blog",TEMPLATE_DOMAIN); ?>"><?php _e("Join Here!",TEMPLATE_DOMAIN); ?></a></p></div>
Then everybody can click Sign Up on home page. Hope It help somebody that have same problem. :D
Responses (31)
Member — 1st January 2011 #
Hey cbriere,
The search and replace for the first item in your code breaks the php code. That is a string replace for your home page url that removes the end slash. However, because the register page is also an is_home it provides the exclusion for this url. What you have done will break the first part of the code. To fix this on you need to know that actual url that is generated from your new piece of code and then insert it into where 'wp-signup.php' occurs in the first item. From the link that was generated it would appear that this should be 'signup-fca'
Hope that helps.
Pat
Member — 2nd January 2011 #
Hi wlpdrpat,
Thanks for the reply.
As per the instructions in the plugin, it states:
"Checking this option will disable the wp-signup.php form and change the signup url automatically every 24 hours. It will look something like http://comunidadespr.com/signup-XXX/."
If I insert the link as you suggests, that means that after 24 hours, the link will not work since another one will be generated in the fly.
Thanks again.
Member — 2nd January 2011 #
Hey cbriere,
Try the following:
What you showed:
<?php if( is_home() && str_replace("/","",$_SERVER['REQUEST_URI']) != '<?php ust_wpsignup_url(); ?>' && str_replace("/","",$_SERVER['REQUEST_URI']) != 'register' ) { ?>Try this:
<?php if( is_home() && str_replace("/","",$_SERVER['REQUEST_URI']) != ust_wpsignup_url() && str_replace("/","",$_SERVER['REQUEST_URI']) != 'register' ) { ?>Or this:
<?php $ustwpsignup = ust_wpsignup_url(); if( is_home() && str_replace("/","",$_SERVER['REQUEST_URI']) != $ustwpsignup && str_replace("/","",$_SERVER['REQUEST_URI']) != 'register' ) { ?>I'm not too familiar with the plugin you are using but I am pretty good with php and the way that you coded it initially you placed a php call inside of another php call, which doesn't work well. The two options I have listed above should both work. I prefer the second one just as a matter of coding preference.
Hope that helps.
Pat
Member — 2nd January 2011 #
Hey wlpdrpat,
Thanks again. Unfortunately that doesn't worked. I tried both codes.
The effect of both codes suggested, is that the generated url is displayed (out the area where it is suppossed to be) and without a link. It is displayed below the pages link and removed part of the template.
In the Create a new account link, it still displays the long incorrect url.
Nice try. Thanks.
Member — 2nd January 2011 #
Oops!! Slip of the keyboard!
<?php $ustwpsignup = (ust_wpsignup_url()); if( is_home() && str_replace("/","",$_SERVER['REQUEST_URI']) != $ustwpsignup && str_replace("/","",$_SERVER['REQUEST_URI']) != 'register' ) { ?>Try this.
Pat
Member — 2nd January 2011 #
wlpdrpat,
Thanks, but still with the same results.
Member — 2nd January 2011 #
Hey cbriere,
OK. I have looked at the code you provided originally to see what it purposes is (initially, I was just trying to help you write proper code). The first line of code:
<?php if( is_home() && str_replace("/","",$_SERVER['REQUEST_URI']) != 'wp-signup.php' && str_replace("/","",$_SERVER['REQUEST_URI']) != 'register' ) { ?>The purpose of this is to do a string replace searching for / in the string REQUEST_URI and replacing it with nothing then comparing the result to ensure that it is not wp-signup.php or register. If it meets all these requirements then it will display what follows this php call, which is signified by the open bracket at the end of the call: "{" Using your replacement code here replacing wp-signup.php for ust_wpsignup_url() will not have much of an effect because it will be using an absolute url to compare.
In other words placing your ust_wpsignup_url() in the first piece of code is not the problem as this is just a comparative analysis to decide whether or not to display the code that follows it.
This is because the second part of the code is designed to generate a relative link to either register if you are using bp or wp-signup if not:
/<?php if( $bp_existed == 'true' ) { //check if bp existed ?>register/<?php } else { ?>wp-signup.php<?php } ?>Notice the leading / before the php call above. This is designed to generate a relative link. Messy, messy, messy! Of course, this is because the skin is designed to work with either bp or wp. However, this is the problem. When you replace wp-signup.php with ust_wpsignup_url() in this part of the code you end up with the http://comunidadespr.com/http://comunidadespr.com/signup-b8e/ because this is designed to provide a relative link.
Revert the first code to it's original state:
<?php if( is_home() && str_replace("/","",$_SERVER['REQUEST_URI']) != 'wp-signup.php' && str_replace("/","",$_SERVER['REQUEST_URI']) != 'register' ) { ?></p>Of course I am not sure why there is a hanging close paragraph following this code and this may be the reason you are seeing the url under your menu. However, reverting it to its original should work.
and try this for the second code:
<div id="intro-package"><div id="edublog-free"><h3>Añada Su Comunidad En Segundos. Es Gratis!</h3><p><?php if( $bp_existed == 'true' ) { //check if bp existed ?>/register/<?php } else { ?><?php ust_wpsignup_url(); ?><?php } ?>" title="Get yourself a free blog">Unase Ahora!</p></div>
</div>
What I have done above is moved the leading / that was before the php call creating a relative link for both register and wp-signup into the area for register only. This should do the trick for correcting your http://comunidadespr.com/http://comunidadespr.com/signup-b8e/ to http://comunidadespr.com/signup-b8e/
Cheers,
Pat
Member — 2nd January 2011 #
Hi Pat,
Reverted to original. Then replaced code as suggested. Still dont work. The link text/contents is displayed but without the link, and the "Create a new account" link in the form still displays the long incorrect link.
Don't know if this is important, but here it goes: I just noticed that I'm using The Edublogs Homepage Theme ver 2.1.3 and the current one is ver 2.1.8. However, I don't want to upgrade since I'm afraid of losing work done on it.
I appreciate your time and effort, but it's time someone from WPMUDEV helps us here.
Member — 2nd January 2011 #
Hey cbriere,
Sorry, guess I am asleep at the wheel. The code is missing the anchor. Without and anchor it won't generate a link.
This is what it should be:
<div id="intro-package"><div id="edublog-free"><h3>Añada Su Comunidad En Segundos. Es Gratis!</h3><p>/register/<?php } else { ?><?php ust_wpsignup_url(); ?><?php } ?>" title="Get yourself a free blog">Unase Ahora!</p></div>
</div>
Regarding the code for the Login Block. You will have to make the same type of repair to it. If you supply the code, we can get it right.
Pat
Member — 2nd January 2011 #
I knew I had included the anchor in my previous post!!! for some reason the forum is stripping out my anchor from the code.
I will try it again here but will break it into segments:
<div id="intro-package"><div id="edublog-free"><h3>Añada Su Comunidad En Segundos. Es Gratis!</h3><p>
after the above and before the below code you need an anchor < a href=" (I added a space between < and a so that it will display)
<?php if( $bp_existed == 'true' ) { //check if bp existed ?>/register/<?php } else { ?><?php ust_wpsignup_url(); ?><?php } ?>" title="Get yourself a free blog">Unase Ahora!after the above code and before the below code you need to close the anchor < /a > (again I added spaces)
</p></div></div>
I didn't check my previous posts until just now. I added these in each post but the forum stripped them.
Sorry about that!!
Pat
Member — 2nd January 2011 #
Hi wlpdrpat,
Now I have this error:
"Parse error: syntax error, unexpected '}' in /home/xxxxxx/public_html/wp-content/themes/edu-clean/header.php on line 192".
Member — 2nd January 2011 #
wlpdrpat,
My last post was made before I read your last post. Let me modify the file and I will report back.
Thanks.
Member — 2nd January 2011 #
Hi wlpdrpat,
Sorry, but I have trouble understanding your last post.
Could you be so kind and attach a txt file with how the code should read?
Thanks.
Member — 2nd January 2011 #
Here it is!
Pat
Member — 3rd January 2011 #
Hey Pat,
Your mod solved the issue of the signup link located in the box. Thanks a lot!
Now I have to figure out how to solve the same issue in the link that says "Create a new account". That link still points to the long/incorrect url here:
(http://comunidadespr.com/http://comunidadespr.com/signup-c06/)
For some reason it is calling the site url and then is also adding the full site url again with the signup link.
Member — 3rd January 2011 #
This is the current code of the link included in the form that is showing the long/incorrect link:
<div id="main-header-inner"><?php if( is_home() && str_replace("/","",$_SERVER['REQUEST_URI']) != 'wp-signup.php' && str_replace("/","",$_SERVER['REQUEST_URI']) != 'register' ) { ?>
Member — 3rd January 2011 #
Well, something happens with this forum that the code is not shown correctly. The forum is removing some parts of the code.
Again, just find this code in the profile.php file (which is part of the form):
"<?php bloginfo('url'); ?>/<?php ust_wpsignup_url(); ?>"And remove the following part:
<?php bloginfo('url'); ?>/That's it.
Lead Developer — 3rd January 2011 #
Sorry for the confusion here.
<?php ust_wpsignup_url(); ?>prints the entire link, so you need to replace the entire link with it so
<a href="http://comunidadespr.com/wp-signup.php">will be
<a href="<?php ust_wpsignup_url(); ?>">Member — 26th December 2011 #
Hello Aaron,
I used your instruction replacing the wp-signup.php
echo '<li class="bp-signup no-arrow">">' . __( 'Sign Up', 'buddypress' ) . '';
But this is what I get...
http://drydot.com/%3C?php ust_wpsignup_url(); ?>
Any idea on what I am doing wrong?
Member — 17th January 2012 #
Is this forum alive????
After a few weeks without answer I am giving up...
I started a fresh new WP installation
but after set up anti splog as per intructions, the following is all I get:
http://drydot.com/%3C?php%20ust_wpsignup_url();%20?%3E
Funny keep the forum locked for just paid members then people are misleaded to buy this F C S
Seriously!!!!!!!!!!
Member — 17th January 2012 #
Hey renato.
Could you print the current code? Since you've re-installed WP I'm guessing it could look different. It looks like you have not removed enough code when you tried to replace the signup link. If you show me the code I'll do my best to explain.
Member — 17th January 2012 #
The intructions from the plugin are clear but DOES NOT WORK.
It would be great to just rewrite the instruction in a way that dummies can follow.
I tried to follow this instructions:
Checking this option will disable the wp-signup.php form and change the signup url automatically every 24 hours. It will look something like http://drydot.com/signup-XXX/. To use this you may need to make some slight edits to your main theme's template files. Replace any hardcoded links to wp-signup.php with this function: <?php ust_wpsignup_url(); ?> Within post or page content you can insert the [ust_wpsignup_url] shortcode, usually in the href of a link. See the install.txt file for more detailed documentation on this function
Then I tried:
">Signup Now
What I get as a result of this link is:
http://drydot.com/%3C?php%20ust_wpsignup_url();%20?%3E
Member — 17th January 2012 #
<a href="<?php ust_wpsignup_url(); ?> ">Signup Now</a>Member — 17th January 2012 #
Sorry,
Is The line I am Using:
<a href="<?php ust_wpsignup_url(); ?> ">Signup Now</a>And This is what I get clicking on the link
http://drydot.com/%3C?php%20ust_wpsignup_url();%20?%3EMember — 17th January 2012 #
This is the code I'm using:
<a href="<?php ust_wpsignup_url(); ?>">Signup Now</a>It's the exact same code. That's strange.
Is it possible that it's within PHP tags? Check so that there's a ?> before the line where you are currently having this html code. If there's not, add it before that line and add <?php after it. If you're not sure what that is, just post more code here so that I can see what's before and after the piece of code that you just posted.
Member — 22nd January 2012 #
I put it to work but the problem is not solved...
I am able to use the shortcode [ust_wpsignup_url] in pages and post which works fine using the following code:
<a href="[ust_wpsignup_url]">Signup Now</a>However when I try to use it in any other plugin such as slide tabs, css table pricing grid, rock tab and many others.. it does not work.
this code <a href="[ust_wpsignup_url]">Signup Now</a>this code <a href="<?php ust_wpsignup_url(); ?>">Signup Now</a>The code I guess is right, but it would not work for instance as a link in one Slider.
VERY ANNOYING....
Any suggestion ???
Geeky Developer — 22nd January 2012 #
[ust_wpsignup_url] work ok in post and pages since its shortcode support built in
did the other plugin you use support shortcode?
the text save must wrap with something like this
<?php
echo do_shortcode ( $text setting save from plugin );
?>
Member — 22nd January 2012 #
Hi Richie,
Apparently none of the several plugins that I have tried support shortcode.
Actually I have no idea.
I just paste the code mentioned into the box designed to the sign up link.
Member — 24th January 2012 #
short code don't work with me too. OR It about theme. I use Edu Clean Theme same renato123. And i try to use...
1.
<a href="[ust_wpsignup_url]">Signup Now</a>2. ust_singup_url()
at header.php, I still don't work.
renato123, I found your solved problem at "Añada Su Comunidad En Segundos. Es Gratis!UNASE AHORA!" Please suggest me what code that you use in this area.
Member — 24th January 2012 #
I used the following code in the page content or into the post:
<a href="[ust_wpsignup_url]">Signup Now</a>It DOES NOT WORK "inside of other plugin"
Unfortunately there are no support for paid members, we have to rely in each other to solve these problem, what seems unfair and after pay for one year subscription I fell being riped off by these scammers...
I am sorry if I can't help anymore.
Member — 24th January 2012 #
Thanks renato123,
I think, i can solved problem in Sign Up area on header.php but i still can't solve short code in post/page, I think it have problem with Edu Clean Theme.
Let me record, How to change header.php (of Edu Clean Them only) for Anti-Splog.
1. Open header.php and search /wp-signup.php that you will found at line number...111, 245, 255, 257 (some time not same me don't mine please compare with this code)
Replace all /wp-signup.php with <?php ust_wpsignup_url(); ?>
2. At line number 257 change it to
257 <div id="edublog-free"><h3><?php _e("Get started in seconds for free",TEMPLATE_DOMAIN); ?></h3><p><a href="<?php echo home_url(); ?>" title="<?php _e("Get yourself a free blog",TEMPLATE_DOMAIN); ?>"><?php _e("Join Here!",TEMPLATE_DOMAIN); ?></a></p></div>Then everybody can click Sign Up on home page. Hope It help somebody that have same problem. :D
Become a member