Jump to content
JohnB

Adding a hook to call some php

Recommended Posts

JohnB    0
JohnB

Hi All,

I use Slidedeck 2 and want to use some shortcode to run in a pop up window use in a lightbox style popup.

The code is <?php eco do_shortcode("[slideeck2 id=xxxx]");?>

I can not find anywhere in 2.3 to add php to be used in a hook.

How do I do that.

Also there will I am sure be other bit of php I want to use in time

one web site is www.johnnbroome.co.uk

If it is a plugin then that's fine.

Cheers

John

Share this post


Link to post
Share on other sites
Rob    547
Rob

John, a hook is to include PHP code or other code into a specific location. That looks like something you want to add in a more flexible place.

You want to use this plugin: http://wordpress.org/extend/plugins/shortcode-exec-php/

It allows you the luxury of converting the PHP snippet to a shortcode which you may place anywhere your heart desires.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
JohnB    0
JohnB

Hi Smart egg,

I should have told you more.

I am using this plugin

http://www.tipsandtricks-hq.com/wordpress-video-lightbox-plugin-display-videos-in-a-fancy-lightbox-overlay-2700

With this set of instructions http://www.tipsandtricks-hq.com/wp-content/uploads/docs/WP-Video-Lightbox-Plugin-Usage-Guide.pdf

shortcodes are not use in it. So I use the WP Video Lightbox (not just for videos) to create a lightbox that pops up. In that (as far as I understand it) a shortcode can not be used.

So if there is another plugin that is a pop up and can call Slidedeck (www.slidedeck.com) shortcode then I'd love to know where.

Cheers

John

Share this post


Link to post
Share on other sites
Simon    247
Simon

In a post is it? Why not use the in built modal popup?


[pl_modal title="Title" type="btn" colortype="info" label="Click Me!"][slidedeck2 id=xxxx][/pl_modal]
[/CODE]

Share this post


Link to post
Share on other sites
JohnB    0
JohnB

Hi Karma,

Did you know that shortcode is case sensitive!! I tried it. But

In the example I show a still image that then opens into the popup.

Here it is http://johnnbroome.co.uk/wp-content/uploads/2012/10/Image-to-click-on-not-a-button.png

Can I replace the label "clicl me" with an image as above? And how?

I think we are close

Cheers

John

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Can you provide a link to the page where the modal is active please.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
JohnB    0
JohnB

Hi Karma,

http://johnnbroome.co.uk/plugin-sample/pagelines-modal/178/

Also note the header is under the menu bar?

The Leave a reply should not be there. I am not asking you to do any more than you want to here. I can add those later but if you want to .....

This is a development site for use on another domain when I have it in order.

But the click me works.

Thanks,

John

Share this post


Link to post
Share on other sites
catrina    103
catrina

I'm not sure why the header is showing underneath the menu bar. Do you have any custom CSS controlling any elements on your site?

As for the Comment box, it's there because the Comments section is activated in the template for that page in Drag & Drop. It needs to be deactivated.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
JohnB    0
JohnB

Hi All,

Thanks advocate,

This one above is a post so where is the Comments section in that

This is a copy that is a page- http://johnnbroome.co.uk/model-2-page-version/

no comments section there.

This is all the css- what should I add/removed? (and why please)

body{}

body.fixed_width .section-branding .content-pad {

padding: 0px;

height: 120px;}

#header {

background: url(http://johnnbroome.co.uk/wp-content/uploads/2012/09/JohnBroome1.png) Center top no-repeat;

}

Cheers

John

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi John,

We seem to be going off topic here with another issue. If you have a separate issue then please in future create a new topic.

1. If you wish to open the Slidedeck slider in a lightbox, I think you will probably best install a lightbox/fancybox plugin from the Wordpress plugin repository and then follow the instructions for the plugin. I also recommend you contact the SlideDesk support for assistance to.

The PageLines/Bootstrap modal wasn't really designed to house a slider.

2. To resolve your header background image, go to PageLines > Drag and Drop and then activate the Branding section. Then replace your header code with this:


#branding {
background: url(http://johnnbroome.co.uk/wp-content/uploads/2012/09/JohnBroome1.png) Center top no-repeat;
}[/CODE]


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
JohnB    0
JohnB

Thanks Rockstar,

worked.

John

Share this post


Link to post
Share on other sites
mackenzie    12
mackenzie

The topic was marked as resolved.


Mackenzie - PageLines Help Desk

The Centsible Family - Writer, Photographer and Coffee Addict

---------------------------------------------------

Kindly search this forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • casseysdesigns
      By casseysdesigns+
      In the past I would use nextbox for this task. However, Platform 5 does not have nextbox. I will do my best to describe what I am trying to do.
      I am creating a template for coaches, each product has its own link but they all share a common coach id. I want to set up the templates with the links for each product with a variable for the coach id so that I can change the coach id for all the links on the site by just changing the value of the variable $coachId. To do this I'll need to do something like the following...
      <a href="salesite.com/productcodes/referringRepId=<?= $coachId ?>" target="_blank">Product Purchase Link</a> Is it possible to do this with Platform 5?
    • Dana
      By Dana+
      Hi DMS team,
      Please help out on how to add Post tags to the bottom of each post. Tried looking at the hooks tutorials but not sure what to do here.
      Thanks a lot.
       
       
       
       
    • jvheintze
      By jvheintze+
      I just tried to figure out how to use Lax in combination with Post Thumbnails the following way: instead of showing the Featured Image on top of the content section I would like to have a Lax section above the content which loads for each post the featured image. To do so it seems there should be some kind of word press hook support necessary (not ready yet)? Or did I miss something?
    • janpeeters
      By janpeeters+
      I read a lot lately about how much faster PHP 7 is than older versions. Is PL5 compatible with 7?
      Does anyone have experience with running their whole PL5 site on PHP 7? Would love to hear your experiences.
      Thanks, Jan
    • dymond
      By dymond+
      I've been trying to upload a video to use as a video background, but the size was 12m, and the alotted max file size is 8m. I downloaded a couple of pugins that increase the size by creating php.ini files and all of that jazz, but to no avail. It would say (Max file size = 250mb) but after I uploaded I would get an "HTTP ERROR",
      Soooo I logged into my cpanel and saw that the php I was using was 4 version out of date. I upgraded my php to PHP 5.6 and now I get
      Fatal error: Out of memory (allocated 39583744) (tried to allocate 15 bytes) in /homepages/39/d200014696/htdocs/dymondentertainment.com/wp-content/themes/dms/dms/includes/less.plugin.php on line 848
      When I activiate another theme that is not pagleines, the site works fine.... but will no longer work with Pagelines DMS Version 2.2
       
      My site has no gone dark. What can I do?
×