Jump to content


Photo
- - - - -

save code changes in a safe way

code

Best Answer evert100 , 25 January 2013 - 06:35 PM

Thanks, can you please do that for me. And please make it responsive. I changed the css to make This happen, but seems logical.

Can you still give me à clue About saving snippets of code. Add to functions.php?

Thanks Go to the full post


  • Please log in to reply
5 replies to this topic

#1 evert100

evert100

    Super Member

  • Members
  • 156 posts
  • Framework Version:2.3.8.
  • Country: Country Flag

Posted 25 January 2013 - 02:36 PM

Hi,

 

I had to make hardcode changes in the class.shortcodes.php file.

I wanted my popover window to work with click instead of hover and tried to put some html in it.

Okay, my question is how to save this little piece of code in a way it will not be overwritten with pagelines updates.

 

I don't have a child theme installed but work with the customization plugin. and work with version 2.4 on a client website.

 

What is the best solution here?

 

Thanks,

Evert



#2 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 25 January 2013 - 02:51 PM

You can 'overload' a class and change the function quite easily in PHP

 

See this post, i provided a plugin that overloaded another shortcode, the code you need will be similar.

Please Login or Register to see this Hidden Content



#3 evert100

evert100

    Super Member

  • Members
  • 156 posts
  • Framework Version:2.3.8.
  • Country: Country Flag

Posted 25 January 2013 - 03:01 PM

Hi Simon, before i forget another thing. You wrote in the forum that in version 2.4.1 the popover will have option for html. Is it possible to add the option for changing the trigger from hover to click because of Ipad issues? You know what i mean...!

 

Now to the above answer of yours: Does this provide that my code changes will be saved from updates overwritten-ness? I see a modal and a second modal. That's not my point.

 

Please could be a little more precise?

 

Thanks.



#4 evert100

evert100

    Super Member

  • Members
  • 156 posts
  • Framework Version:2.3.8.
  • Country: Country Flag

Posted 25 January 2013 - 03:05 PM

I looked at the zip. It seems to me a bit overloaded to do it this way by means of an extra plugin and files in my solution because i just changed 2 lines of code in a part of class.shortcodes.php the part which deals with popovers. Is there a simpler way to do this in my situation?



#5 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 25 January 2013 - 05:43 PM

Open a bug report and I'll add the option to the shortcode

#6 evert100

evert100

    Super Member

  • Members
  • 156 posts
  • Framework Version:2.3.8.
  • Country: Country Flag

Posted 25 January 2013 - 06:35 PM   Best Answer

Thanks, can you please do that for me. And please make it responsive. I changed the css to make This happen, but seems logical.

Can you still give me à clue About saving snippets of code. Add to functions.php?

Thanks