Support

Home Forums Event Espresso Premium hyperlink from text

hyperlink from text

Posted: October 17, 2014 at 5:47 am


Angus Russell

October 17, 2014 at 5:47 am

On this page, http://supersportsevents.me/, using calendar table plugin, I want to be able to link from the “Venue Name” to the venue page.

I’ve fiddled with the PHP in the plugin and this is the code I’ve cobbled together after some trial & error:

redacted – Event Espresso support team – LOC

So, any advice how to tweak the code so that only the venue name becomes a hyperlink, and links to the venue id url?

Thank you
Angus


Lorenzo Orlando Caum

  • Support Staff

October 17, 2014 at 8:20 pm

Hi Angus, the support forums did not render the code correctly and its difficult to follow in its current state.

Could you send a copy of the file to the email below:

support [at] eventespresso.com

Be sure to include this support URL in your email so we know what the file is for:

http://eventespresso.com/topic/hyperlink-from-text/

Thanks


Lorenzo


Angus Russell

October 18, 2014 at 9:15 am

Hi Lorenzo

I’ve put it in pastebin http://pastebin.com/aEr7B9bA

name is SSEME2 – 181014

Thanks


Lorenzo Orlando Caum

  • Support Staff

October 18, 2014 at 11:03 am

Hi,

I think I found the issue. Could you close the link? See this:

http://cl.ly/image/2j2L1c1b112X


Lorenzo


Angus Russell

October 18, 2014 at 9:17 pm

Thanks Lorenzo that’s solved the “extension of the link” issue, but it’s still linking to the home page supersportsevents.me not the event url. Neither $url_venue_id, nor $venue_id_url nor link $venue_url or $url_venue link to the venue id page.

So, the question is, how do I determine the event url?

” ” target=”_blank”><?php echo stripslashes_deep($event->venue_name); ?><br />

Thank you


Angus Russell

October 18, 2014 at 9:26 pm

Here’s the whole snippet – looks like it was truncated above.

” ” target=”_blank”><?php echo stripslashes_deep($event->venue_name); ?><br />


Angus Russell

October 18, 2014 at 9:35 pm

That didn’t work either – here’s the relevant part!

” >

Is some form of identifying the URL required, such as mention in a foreach loop?

Sorry, no PHP knowledge at all, purely looking for patterns in similar examples!

Thanks


Angus Russell

October 18, 2014 at 9:37 pm

Right, let’s see if this works!

” ” target=”_blank”><?php echo stripslashes_deep($event->venue_name); ?><br />


Tony

  • Support Staff

October 20, 2014 at 3:41 am

Hi Angues,

The forum strips out a lot of code for security. When posting examples your are best using pastebin like above πŸ™‚

Can you tell me where (within Event Espresso) are you adding the venue url?
Which field are you adding this to?
Are you using the venue manager?


Angus Russell

October 20, 2014 at 8:07 am

Hi Tony – that was frustrating – I know for next time!!

I’m trying to adapt the Event Espresso Template – Calendar Table plugin aka espresso-template-calendar-table/index.php – which creates the calendar that is our home page – supersportsevents.me.

Venue manager is alive and kicking.

We’re trying to get the venue name to link to the venue page, because currently there appears to be no way of getting to it! Which is irritating considering how much effort went into creating them. Google maps are useless in this part of the world since there is no proper consistent system of addresses.

I’ve added the entire plugin as it is running now with functioning edits here SSEME3 – 201014 http://pastebin.com/5J93EAAX

Thanks


Tony

  • Support Staff

October 20, 2014 at 8:57 am

In EE3 venue pages are not automatically created for your venues, can you link me to one of the venue pages?

Is it a normal post with [ESPRESSO_VENUE id=”x”] in the content?


Angus Russell

October 20, 2014 at 11:13 am

Yup, standard shortcode.

We did have links to venues setup from our home page, but then i upgraded EE3 and we lost the changes. Developer made them when he set it up, but hasn’t sent us back the css he made or offered us access to the server so can not access the backup that is stored there. First backup only went there, after that I managed to get it to work with DropBox so I have backups now, that I can access.

The venue link is quite important since the description includes the embed code from g-maps for the precise locations of our events – outdoor sporting ones.

I’ve just looked and our whole event thing is out the window and back to the std setup.

I can only access where I have created static pages. We removed the info form the registration form since it was in the way. The intention being that people could link to it from the venue name; that still is the intention if we can work out how!

Thanks


Dean

October 21, 2014 at 4:00 am

Hi,

If the post/page where the venue details are has a title that just includes the venue name exactly then you could do something like this:

See this pastebin http://pastebin.com/9bcjCEqG

All that does is make a slug out of the venue name (which is why the page/post with the venue details on must have a title the same as the venue name) and then makes it into a link.

Please note that updates WILL over write any changes made to the template.

  • This reply was modified 5 years, 8 months ago by  Dean. Reason: fell afoul of the forums code syntax!


Angus Russell

October 21, 2014 at 4:18 am

OK, so if I create static pages for each venue, with exactly the same name as the venue name, then that code (once I’ve added in my specific parameters) will create a link from the venue name to the static page?

Presumably I paste this code in the location within the plugin where I want the link to occur? Just checking πŸ™‚

Thanks


Dean

October 21, 2014 at 6:01 am

Hi,

Yes to all the above. It was the simplest way I could see to create the link and keep it somewhat automated. There might be other ways though.


Angus Russell

October 21, 2014 at 7:44 am

I’m hoping that you guys have the jobs you do because you do know the simplest way πŸ™‚

Let’s see how I get on adapting the code! Let’s mark this one pending, for now!

Thanks


Angus Russell

October 21, 2014 at 11:15 pm

Works a treat, just need to add the target_blank code in now.

Thank you. Now resolved πŸ™‚

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Angus Russell 5 years, 8 months ago ago

Topic Tags

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!