Can a Language String be placed in an HTML Block?

Hi,

To help my members promote my site and therefore get more sign-ups, I'm creating a subdomain for each Affiliate using their "nickname" (NOT Affiliate #), IE:

http://john.isexclub.net

( The "index.html" will be their Splash Page with an introduction about the site and their Affiliate Link to the site. )

Now, What I want to do is put an HTML block on the "Profile Page" with a "Join Now!" banner ( see example at http://isexclub.net/blaine ) that will pull the Member's "nickname" and place it in a link, ( I know this isn't correct, but ) something like this, IE:

<a href="http://{0}.isexclub.net">{ BANNER IMAGE }</a>

How exactly would I write the code to accomplish this.... I've tried language strings and everything else and after about 4 hours of tinkering, I decided I would ask someone who knows.

Thanks in advance for your help,
Blaine.

Thanks in Advance, Blaine
Quote · 23 Dec 2009

You should using PHP blocks instead HTML. HTML blocks only for static content.

Quote · 24 Dec 2009

I'm still using Version 6.1.6 .... how do I create a php block and what text/code would I type in the block to accomplish what I need?

Thanks,

Blaine

Thanks in Advance, Blaine
Quote · 24 Dec 2009

blaine, that is a mod that JT released back in the day. can you go over to boonexnerd.com and get registered and do a search on that?

Regards,

DosDawg

When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support
Quote · 24 Dec 2009

Thanks DosDawg,

I found it and implimented it and I now have an  "_PHP Block" appearing in the Page Builder under the "Samples" section!

I created a test PHP Block on the profile page.... I inserted {0} thinking this will pull the nickname/username of the person who owns the profile page..... When I looked at the profile page, the block had the following error:

=================

Parse error: syntax error, unexpected '}' in/home/blaine69/public_html/isexclub.net/inc/classes/BxDolPageView.php(281) : eval()'d code on line 1

=================

I looked at line "281" in the file BxDolPageView.php and it said:

function genColumnHeader( $iColumn, $iColumnWidth ) {

........ now, I don't know if this is causing this but when I set-up the PHP Block in PageCompose I set the Page Width to 1012px (because that is the width of my site) could this be causing the ERROR? Should I change it back to 96px and let it fix itself when I adjust the page width in Page Builder.

Blaine.

Thanks in Advance, Blaine
Quote · 24 Dec 2009

your teaching yourself which is awesome! none of the stuuf your doing will work  its specific to design

ok you can get nicks a few different ways

so your php block will have in it

require_once('inc/header.inc.php');

require_once('inc/profiles.inc.php');

$iMemID = (int)$_COOKIE['memberID'];

$thenick = getNickName( $iMemID );

now you can use a new url with peoples' nickname by using {$thenick} where ever you need it

I have video tutorials to help you mrpowless.com
Quote · 24 Dec 2009

Thanks MrPowless,

I inserted:

require_once('inc/header.inc.php');

require_once('inc/profiles.inc.php');

$iMemID = (int)$_COOKIE['memberID'];

$thenick = getNickName( $iMemID );


in the _PHP Block that I created.... I also inserted:

{$thenick}


....... Now I'm getting the ERROR code:


Parse error: syntax error, unexpected '}' in/home/blaine69/public_html/isexclub.net/inc/classes/BxDolPageView.php(281) : eval()'d code on line 7

.... it has changed from line 1 to line 7


I'm guessing line 7 is:  $thenick = getNickName( $iMemID );

What now?

Blaine.

Thanks in Advance, Blaine
Quote · 25 Dec 2009

This code will work:

global $p_arr;
$Memb = (int)$p_arr['ID'];
$thenick = getNickName( $Memb );

echo "
<p style=\"text-align: center;\">
<a href=\"http://$thenick.isexclub.net\">
<img src=\"/images/join_us.gif\" height=\"345\" width=\"200\" style=\"vertical-align: middle;\" title=\"Join Us!\" />
</a>
</p>
";

If you use a PHP block and add html code like this: <p style="text-align: center;">

you will make a parse error also if you use { } in the wrong place

you need to edit html code to: <p style=\"text-align: center;\">

Quote · 25 Dec 2009

Thanks okweb..... absolutely PERFECT!!!!!

No I can get back to finalizing the automation of creating subdomains!!!! .... I found a FREE script that does just this.

When I get it perfected I will pass it on to all who want it!

I'm understanding that the more pages a website has, (with meta tags) will improve the search ratings... so in other words if you have 3,000 members, you will now have 3,000 page ratings!

Thanks mrpowlessokweb for your assistance.

Blaine.

Thanks in Advance, Blaine
Quote · 25 Dec 2009

i wasnt writing the code for him okweb! how is he going to learn if you do it for him.....he didnt learn anyting by copying and pasting lol   there are many other ways to write it too... try out a few more doing some research....have fun bro

I have video tutorials to help you mrpowless.com
Quote · 27 Dec 2009

MrPowLess,

But I have learned, I learned for the next PHP installation!

okweb just saved me valuable time going back and forth playing 100 questions.... I'm already working on my next PHP installation thanks to okweb.

MrPowLess, Any chance you might want to help on my next idea/project?:

http://www.boonex.com/unity/forums/#topic/Help-installing-THE-Perfect-Profile-Image-Cropper.htm

Thanks,

Blaine.

Thanks in Advance, Blaine
Quote · 29 Dec 2009

On a somewhat related matter, how can I translate my site news, polls, email, etc. into multiple languages that I've installed?  Showing the same thing in every language would be ridiculous in admin news etc.

Can I put language strings from the new language inside blocks...?

What about my home page custom html?

Taking Dolphin and Making Profitable Websites Since 2009 :)
Quote · 7 Jan 2010

Dolphinbugfixing has a free mod on here that allows you to place language keys in html blocks, it's rad!

-micliz-

LDS Singles

Solteros SUD Mormón

Taking Dolphin and Making Profitable Websites Since 2009 :)
Quote · 12 Feb 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.