Bonus Fields

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Re: Bonus Fields

Postby jadwigo » Wed Jan 19, 2011 4:28 pm

Yup

(the technical explanation: because php 5.1.6 does not support the parameter for debug_backtrace it does not execute, and does not tell the bonusfields extension where to place the bonusfield elements in the edit page)
My pivotx playground is at http://jivotx.twokings.eu - the rest is at http://www.jadwigo.nl
jadwigo
Developer
 
Posts: 117
Joined: Wed Nov 18, 2009 9:49 am
Location: Den Haag, Netherlands

Re: Bonus Fields

Postby gwbonline » Sun Jan 23, 2011 11:47 am

The website is transfered to a server with PHP 5.2.11 and now Bonus Fiels works like it should. Thanks for the help.
gwbonline
 
Posts: 580
Joined: Tue Jan 01, 2008 5:17 pm

Re: Bonus Fields

Postby Logfather » Sat Mar 12, 2011 12:06 pm

I'm currently having trouble with Bonusfields for images. I can upload one etc. but it just takes the filename example.jpg and puts that in the HTML. It should be at least images/example.jpg because without it my image does not appear. :) Any suggestions? Where can I edit this?
Logfather
 
Posts: 163
Joined: Sun Jul 12, 2009 9:29 am
Location: Amsterdam

Re: Bonus Fields

Postby Schop » Sat Mar 12, 2011 6:43 pm

Logfather wrote:I'm currently having trouble with Bonusfields for images. I can upload one etc. but it just takes the filename example.jpg and puts that in the HTML. It should be at least images/example.jpg because without it my image does not appear. :) Any suggestions? Where can I edit this?


Wouldn't that be something you solve in your template code?
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Re: Bonus Fields

Postby Logfather » Sat Mar 12, 2011 9:14 pm

I don't I have been very clear in my post above, let me try this again.

When I upload a photo Pivot automatically puts in the correct name where the image can be found. At this point Pivot somehow doesn't realize it should add all the folders (or some) for a browser to understand where that image is.

When I look up the code with Firebug it's there PERFECTLY (accept it's greyed out). <img> with a width, a height, an alt, the url. But that's where it goes wrong: it just says example.jpg but it should be images/example.jpg or whatever. Not looking forward to putting this in front there every time. :)

YES, I can do this in the template code but all my other PivotX's don't have problems putting the right folder in there either so I'm wondering what can cause this. Where should I look?
Logfather
 
Posts: 163
Joined: Sun Jul 12, 2009 9:29 am
Location: Amsterdam

Re: Bonus Fields

Postby Schop » Sat Mar 12, 2011 11:08 pm

Logfather wrote:I don't I have been very clear in my post above, let me try this again.

When I upload a photo Pivot automatically puts in the correct name where the image can be found. At this point Pivot somehow doesn't realize it should add all the folders (or some) for a browser to understand where that image is.

When I look up the code with Firebug it's there PERFECTLY (accept it's greyed out). <img> with a width, a height, an alt, the url. But that's where it goes wrong: it just says example.jpg but it should be images/example.jpg or whatever. Not looking forward to putting this in front there every time. :)

YES, I can do this in the template code but all my other PivotX's don't have problems putting the right folder in there either so I'm wondering what can cause this. Where should I look?


do you upload a picture in an entry or page, or as a bonusfields image? Can we see an example?
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Re: Bonus Fields

Postby Logfather » Sun Mar 13, 2011 7:48 am

You mean of the back-end I hope? Took several fields out but here's what goes wrong:

http://www5.picturepush.com/photo/a/5245248/img/5245248.jpg

On the front-end it's like I said: <img src="example.jpg" width="150px" height="150px" alt="lala" /> but that example.jpg doesn't lead anywhere because it should be lala/images/example.jpg.
Logfather
 
Posts: 163
Joined: Sun Jul 12, 2009 9:29 am
Location: Amsterdam

Re: Bonus Fields

Postby hansfn » Sun Mar 13, 2011 6:11 pm

Please listen to Schop. This is something you should fix in your template (using [[upload_dir]] in front of the filename). The Bonus field extension is storing the filename relative to the upload directory. This is the only way to make it portable - what if you move or rename your images folder?

PS! The reason it "works" for normal images in PivotX is that you use template tags that use [[upload_dir]] internally.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Bonus Fields

Postby Logfather » Tue Mar 15, 2011 8:31 am

He didn't mention [[upload_dir]] but I get your point.

Maybe - aside from myself - one other thing that is lacking here is the PivotX docs in general and several plugin docs specifically are lacking badly. I'm gonna write up some of this (Bonusfields) stuff and see if the creator wants to add it to his plugin because especially for the less advanced code junkies this can be a mission impossible.

Thanks for your help!

NEW PROBLEM [[upload_dir]] and [[$entry.extrafields.image]] next to each other produce two slashes, still works though...
Logfather
 
Posts: 163
Joined: Sun Jul 12, 2009 9:29 am
Location: Amsterdam

Re: Bonus Fields

Postby Marza » Thu Mar 17, 2011 3:10 pm

I'm using a Bonus Field to get a page uri and want to combine that with $getpage. I'm a bit puzzled, because this only works if I assign the content of the bonus field to a new variable, and I don't understand why.

So this works:
Code: Select all
[[ if $page.extrafields.somepageuri  ]] 
    [[ assign var=extra_pageuri value=$page.extrafields.somepageuri ]]
    [[ getpage uri="$extra_pageuri " ]]
    <h2>[[ $page.title ]]</h2>
    [[ $page.introduction ]]
    [[ resetpage ]][[ else ]][[ /if ]]


but this doesn't:
Code: Select all
[[ if $page.extrafields.somepageuri  ]] 
    [[ getpage uri="$page.extrafields.somepageuri" ]]
    <h2>[[ $page.title ]]</h2>
    [[ $page.introduction ]]
    [[ resetpage ]][[ else ]][[ /if ]]


I've also tried
Code: Select all
 [[ getpage uri="[[ $page.extrafields.somepageuri ]]" ]]


When I use '[[ print_r var=$somepageuri ]]' and '[[ print_r var=$extra_pageuri ]]' the outcome looks the same.

Am I overseeing something, or can it just not be done without assigning the uri to a variable first?
Marza
 
Posts: 85
Joined: Sat Dec 12, 2009 8:49 pm

PreviousNext

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 3 guests

cron