Replace email adress with an Image

Any Questions or How to regarding the ChronoConnectivity

Replace email adress with an Image

Postby bambid » Wed Feb 03, 2010 1:58 pm

Hello

I tried to Replace the Emailadress with an image with this code

<a href="mailto:{VarMail}"><img src="/.../.../HomepageB.png"></a>

but there is in the result a problem with the email spambot

Image

How i have to set this Tag that it works

MfG bambid
bambid
Fresh Boarder
 
Posts: 11
Joined: Sat Jan 23, 2010 11:20 pm

Re: Replace email adress with an Image

Postby GreyHead » Wed Feb 03, 2010 4:00 pm

Hi bambid,

Turn off the Email spambot - or set it to run before the ChronoForms plugin.

Bob
Bob Janes ChronoForms Support
*** The ChronoForms book is out NOW ***
ImageClick for more info
User avatar
GreyHead
Administrator
Administrator
 
Posts: 14700
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re: Replace email adress with an Image

Postby bambid » Wed Feb 03, 2010 4:12 pm

Ok

i searched for this option to deactivate the spambot but i can't find it! can you tell me where i can find it? or what was that with the chronoform you have told?

greets

bambid
bambid
Fresh Boarder
 
Posts: 11
Joined: Sat Jan 23, 2010 11:20 pm

Re: Replace email adress with an Image

Postby GreyHead » Wed Feb 03, 2010 4:26 pm

Hi bambid,

The Joomla spambot is the 'Email Cloaking' plugin which lives in Site Admin | Extensions | Plugin Manager.

If it is some other spambot then I don't know where it might be.

Bob
Bob Janes ChronoForms Support
*** The ChronoForms book is out NOW ***
ImageClick for more info
User avatar
GreyHead
Administrator
Administrator
 
Posts: 14700
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re: Replace email adress with an Image

Postby bambid » Thu Feb 04, 2010 10:26 pm

Hello Greyhead

that works great!

now i got an ather problem!

I replaced the Edittext with an image. this was not the problem, but an unregistred user see also this image. is it posible to say that un unregistred user will not see them?

i tried it like that:
Code: Select all
if ({edit_record} == "" )
{
echo "";
}

else {
echo "<td><div align='right'><a href='{edit_record}' target='_blank'><img src='/images/smilies/Edit.png'></div></td>";
echo "<td><div align='right'><a href='{delete_record}' target='_blank'><img src='/images/smilies/Delete.png'></div></td>";
}


But {edit_record} seems not to be empty if someone isn't logged in.

can you tell me how i can check if someone is logged in or not.

Thanks for your replay

Best Reguards
bambid
bambid
Fresh Boarder
 
Posts: 11
Joined: Sat Jan 23, 2010 11:20 pm

Re: Replace email adress with an Image

Postby GreyHead » Thu Feb 04, 2010 11:12 pm

Hi bambid,

I think that you can set the View and Edit permissions to only allow Registered users to edit in which case the link shouldn't be visible to non-registerd users.

Bob
Bob Janes ChronoForms Support
*** The ChronoForms book is out NOW ***
ImageClick for more info
User avatar
GreyHead
Administrator
Administrator
 
Posts: 14700
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re: Replace email adress with an Image

Postby bambid » Fri Feb 05, 2010 7:08 am

Hello
That does not work, because the image witch i load like that:
Code: Select all
<a href='{edit_record}' target='_blank'><img src='/images/smilies/Edit.png'>

load only the link right. If i'm logged in the link works and if i'm not logged in the link gifs back a blank page.
i need to hafe a possibility to check if a user is logged in or not.

Thanks
bambid
Fresh Boarder
 
Posts: 11
Joined: Sat Jan 23, 2010 11:20 pm

Re: Replace email adress with an Image

Postby GreyHead » Fri Feb 05, 2010 7:13 am

Hi bambid;

You can always check the User Object
Code: Select all
<?php
$user =& JFactory::getUser();
if ( $user->id ) {
  // user is logged in
} else {
  // user is a guest
}
?>

Bob
Bob Janes ChronoForms Support
*** The ChronoForms book is out NOW ***
ImageClick for more info
User avatar
GreyHead
Administrator
Administrator
 
Posts: 14700
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re: Replace email adress with an Image

Postby bambid » Fri Feb 05, 2010 7:55 am

great
thx

greetz
bambid
bambid
Fresh Boarder
 
Posts: 11
Joined: Sat Jan 23, 2010 11:20 pm

Re: Replace email adress with an Image

Postby bambid » Mon Feb 08, 2010 6:01 pm

Hello

i got an ather problem.

i tried to match {cf_user_id} with the real user how is right now online.

i get the information for this user with:
Code: Select all
$uid=$user->get("id");


But the {cf_user_id} has a string leght of: 12 characters and
$uid has only 7 characters.

But in echo() bouth got the same value.

how can i make the match of the {cf_user_id} and $uid?

Thanks bambid
bambid
Fresh Boarder
 
Posts: 11
Joined: Sat Jan 23, 2010 11:20 pm

Re: Replace email adress with an Image

Postby GreyHead » Mon Feb 08, 2010 6:19 pm

Hi bambid,

They are both integers so the lengths shouldn't matter. How are you comparing them?

Bob
Bob Janes ChronoForms Support
*** The ChronoForms book is out NOW ***
ImageClick for more info
User avatar
GreyHead
Administrator
Administrator
 
Posts: 14700
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re: Replace email adress with an Image

Postby bambid » Mon Feb 08, 2010 6:28 pm

Hello Bob

ok i tried to match them like that:
Code: Select all
$uid=$user->get("id");
$cfuid='{cf_user_id}';

if ($uid==$cfuid)
{
echo "right";
}
else
{
echo "false";
}

but there is no match!

thanks
bambid
Fresh Boarder
 
Posts: 11
Joined: Sat Jan 23, 2010 11:20 pm

Re: Replace email adress with an Image

Postby GreyHead » Mon Feb 08, 2010 6:51 pm

Hi bambid,

Where are you trying to do the comparison? The {field_name} syntax will only work in a few places.

What are you trying to achieve - this may not be the best approach.

Bob
Bob Janes ChronoForms Support
*** The ChronoForms book is out NOW ***
ImageClick for more info
User avatar
GreyHead
Administrator
Administrator
 
Posts: 14700
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re: Replace email adress with an Image

Postby bambid » Mon Feb 08, 2010 7:02 pm

Ok the Problem is, i got a list of clubs where every club can insert and edit by himself. But the problem is: now can every logged in user edit all club entrys but my purpose is to give, in the body list, an if question like:
Code: Select all
if (($cfuid==$uid) or ($utype == "Super Administrator"))
{            
echo "<td><div align='right'><a href='{edit_record}' target='_blank'><img src='/images/smilies/Edit.png'></div></td>";
}
else
{
echo "<td></td>";
}


but this will not work. i tried to find out why and one of the problems i saw was with:
Code: Select all
echo strlen($cfuid);


how can i give the edit link only the user who entered the club?

thanks bambid
bambid
Fresh Boarder
 
Posts: 11
Joined: Sat Jan 23, 2010 11:20 pm


Return to ChronoConnectivity How To

Who is online

Users browsing this forum: No registered users and 3 guests

 

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 15 minutes)
Most users ever online was 109 on Mon Jul 05, 2010 6:59 pm

Users browsing this forum: No registered users and 3 guests

Current time

It is currently Tue Sep 07, 2010 10:07 am