MyBB Community Forums

Full Version: City Location In Postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
You are wrong.
You have different images for every option. Therefore you need an imagepath.

Selectable options:
Washington
Chicago
California

Image type:
png

Image path:
images/cities/

images in that folder:
Washington.png
Chicago.png
California.png
(2012-01-24, 02:34 PM)Harest Wrote: [ -> ]I just finished my plugin that allows you to do this and has an extra option for displaying the field as an image.

I'd like to use your plugin but cannot find install directions. No readme and could not install intuitively using filezilla (not very experienced) can you please give directions?
^ the plugin consists of main php file & language files . for the language file, I am referring to English only ( ignore file in deutsch_sie )
copy fieldsonpostbit.php to ./inc/plugins folder AND copy fieldsonpostbit.lang.php to ./inc/languages/english/admin folder
activate the plugin as usual & see if it has settings at admin panel --> configuration --> settings ...
(2012-02-22, 07:29 PM)ranjani Wrote: [ -> ]^ the plugin consists of main php file & language files . for the language file, I am referring to English only ( ignore file in deutsch_sie )
copy fieldsonpostbit.php to ./inc/plugins folder AND copy fieldsonpostbit.lang.php to ./inc/languages/english/admin folder
activate the plugin as usual & see if it has settings at admin panel --> configuration --> settings ...

I did that initially but it did not show up in the ACP. I'll double check .....
Same thing. Loads and says it is installed properly but will not show up anywhere in config>settings.


[attachment=25595]
Any ideas?
Anyone have an idea for me on this?
The plugin is working perfectly - my problem was . . . ME! <blush>
Hijacking your thread for abit ...

I have successfully posted the location using $post['fidX']
Eg. Location: USA

But I have noticed some members who did not set their location came up with just "Location: ".

How do I add a if statement in between $post['fidX'] so I can only display the location if it's available?
Use a plugin like Template Conditionals and use a statement like this (untested):

<if $post['fidX'] != 0 then>
Location: {$post['fidX']}
<else>
Location: Nowhere!
</if>

If you only want to show the location if the field's populated (ie remove the Location: Nowhere! bit), remove this, but leave in the closing <if>!

<else>
Location: Nowhere!
Used that previously. Got this error

Quote:Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /functions_post.php(399) : eval()'d code on line 6

Tried
<if $post['fid1'] != 0 then>
Location: {$post['fidX']}
</if>

-----

<if $post['fid1'] != null then>
Location: {$post['fidX']}
</if>
Try this then:

<if $post['fidX'] != "" then>
Location: {$post['fidX']}
</if>
Tried

Location: {$post['fidX']}
</if>

Errors stopped coming out. But the If operation keeps coming true and the "Location:" comes out even if the user did not fill in the "Location" field.

EDIT: I have tried
<if {$post['fid1']} != "" then> as well, same thing. Smile

EDIT: Nevermind, forgot to install conditional plugin ... Fixed ! Big Grin Thanks
Pages: 1 2 3