Sie sind nicht angemeldet.

21

Donnerstag, 20. Januar 2011, 19:27

hi matt -

i kind of hobbled this together without a real understanding of proper coding, but the function may be conflicting with another function in your file, or you may have accidentally copied some invisible character mucking up the code, etc

have you tried inserting the entire block at a different point in your functions.php ?

have you tried it with a different theme ?

also make sure to disable the wp krpano plugin if you are using it, it may cause a conflict

let me know if you cant get it working, we'll get it sorted -

sam


Have tried all of these solutions and it's just doesn't work. I either get a completely blank screen which means an error server side or I just get the shortcode output as plain text in the post.

Matt

tommo77funk

Fortgeschrittener

Beiträge: 159

Wohnort: London

Beruf: Photographer

  • Nachricht senden

22

Donnerstag, 20. Januar 2011, 19:30

It sounds like its not between

<?php

and

?>

all code in the functions.php has to be between these, whatever they are called *question* or there is something wrong with other code in functions.php. If you take out sams code all together it works okay ?

best,

tom

Sam Rohn

Schüler

  • »Sam Rohn« ist der Autor dieses Themas

Beiträge: 110

Wohnort: Brooklyn, New York

Beruf: 360° VR Photographer

  • Nachricht senden

23

Donnerstag, 20. Januar 2011, 19:37

also make sure the entire block is inserted after another functions proper ending " ); " like just after

Quellcode

1
2
3
4
5
6
7
// ADD THUMBNAILS ******

add_theme_support('post-thumbnails');

// KRPANO SHORTCODE
etc
// KRPANO SHORTCODE


sam
Sam Rohn :: 360° Panoramic Photography :: Location Scout :: New York City :: www.samrohn.com

PanoPress :: WordPress Plugin for 360° Panoramas in Flash & HTML5 :: www.panopress.org

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Sam Rohn« (20. Januar 2011, 20:43)


24

Donnerstag, 20. Januar 2011, 19:40

The function copied into the fucntions.php is definitely in-between the php tags. I just don't know where to add: add_shortcode(krpano, 'panorama'); so the site loads. Even with the standard theme it doesn't work. I've tried both php 5.2.13 and 5.3.2 but no difference.

Matt

25

Donnerstag, 20. Januar 2011, 19:43

Worked out the issue, just don't know how to fix it:

PHP Fatal error: Call to undefined function add_shortcode() in /Applications/MAMP/htdocs/oxford_rest/wp-includes/functions.php on line 19

Matt

Sam Rohn

Schüler

  • »Sam Rohn« ist der Autor dieses Themas

Beiträge: 110

Wohnort: Brooklyn, New York

Beruf: 360° VR Photographer

  • Nachricht senden

26

Donnerstag, 20. Januar 2011, 19:48

are you using the latest wordpress 3+ ?

sam
Sam Rohn :: 360° Panoramic Photography :: Location Scout :: New York City :: www.samrohn.com

PanoPress :: WordPress Plugin for 360° Panoramas in Flash & HTML5 :: www.panopress.org

27

Donnerstag, 20. Januar 2011, 19:50

Yes, version 3.04. All the shortcode fucntions are in a file called shortcodes.php in the wp-includes folder but clearly they aren't being loaded :(

Matt

tommo77funk

Fortgeschrittener

Beiträge: 159

Wohnort: London

Beruf: Photographer

  • Nachricht senden

28

Donnerstag, 20. Januar 2011, 20:01

HI,

It might have something to do with the theme you are using. Try add this line to your functions.php

add_filter( 'the_content', 'do_shortcode');

best,

tom

Sam Rohn

Schüler

  • »Sam Rohn« ist der Autor dieses Themas

Beiträge: 110

Wohnort: Brooklyn, New York

Beruf: 360° VR Photographer

  • Nachricht senden

29

Donnerstag, 20. Januar 2011, 20:12

i just tested it using the code from my original post on a relatively virgin install of wordpress using the default 2010 theme, i inserted the entire block of code on the line right after the opening <?php tag - no fatal errors, code worked fine

perhaps toms filter suggestion will work, or you might need to try a different install of wp :(

sam
Sam Rohn :: 360° Panoramic Photography :: Location Scout :: New York City :: www.samrohn.com

PanoPress :: WordPress Plugin for 360° Panoramas in Flash & HTML5 :: www.panopress.org

30

Donnerstag, 20. Januar 2011, 23:38

Neither of the above solutions work. I guess I'll try and create my own code to embed panos into wordpress :(

For some unknown reason there are standard files that aren't being included in the template structure at runtime.

Matt

Sam Rohn

Schüler

  • »Sam Rohn« ist der Autor dieses Themas

Beiträge: 110

Wohnort: Brooklyn, New York

Beruf: 360° VR Photographer

  • Nachricht senden

31

Freitag, 21. Januar 2011, 04:46

hey matt -

i have attached to this post the functions file from the wordpress default 2010 theme w the shortcode already added, try replacing your 2010 themes function.php file with this one, it is working fine for me -

if it does not work, my feeling is that perhaps your wp install is off somehow, you might try adding another shortcode and see if it throws the same error

see these articles for more info on wp shortcodes, and please let me know if you figure out why it is not working properly :(

http://www.smashingmagazine.com/2009/02/…ess-shortcodes/

http://www.catswhocode.com/blog/10-incre…ress-shortcodes

http://net.tutsplus.com/tutorials/wordpr…-the-right-way/

sam
»Sam Rohn« hat folgende Datei angehängt:
Sam Rohn :: 360° Panoramic Photography :: Location Scout :: New York City :: www.samrohn.com

PanoPress :: WordPress Plugin for 360° Panoramas in Flash & HTML5 :: www.panopress.org

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »Sam Rohn« (21. Januar 2011, 11:25)


32

Freitag, 21. Januar 2011, 12:52

The above suggestions didn't work either. I did a manual traceback of sorts by including different files to find the order in which functions are declared. In the end I had to add the add_shortcode(krpano, 'panorama'); as the last line on the shortcodes.php file and all now works.

Thanks everyone for all the help.

Matthew Rogers
360precision.com
http://www.360precision.com/360/index.cf…ic&tripod&heads

Sam Rohn

Schüler

  • »Sam Rohn« ist der Autor dieses Themas

Beiträge: 110

Wohnort: Brooklyn, New York

Beruf: 360° VR Photographer

  • Nachricht senden

33

Freitag, 21. Januar 2011, 15:12

hmm, it shouldn't be necessary to alter shortcodes.php, also bear in mind that this file will be overwritten by wordpress core updates (functions.php can also be overwritten by theme updates, btw)

i did another test last night installing the code as per my own instructions from this thread on a brand new untouched install of wp, it all worked fine, no problems or errors

the only thing i can think of is that your wordpress install or server environment is somehow different than mine, and this is somehow causing the error, perhaps something odd about mamp php ?

anyway, glad you got it working for now, i am just about ready to post the new version with iphone support, stay tuned...

sam

this code has been updated to a new version with iphone ipad support, go here for the new code

sam
Sam Rohn :: 360° Panoramic Photography :: Location Scout :: New York City :: www.samrohn.com

PanoPress :: WordPress Plugin for 360° Panoramas in Flash & HTML5 :: www.panopress.org

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Sam Rohn« (21. Januar 2011, 16:14)