1 (edited by YonasH 2009-02-15 17:38)

Topic: [Release] FAQ and Privacy policy

Hello

This is my first extension. But I have many more in plans smile

Extension adds FAQ and Privacy policy section to your forum. You can use one or both of them. Privacy policy link is placed in footer. FAQ link is placed in main menu (depends of configuration before Rules / after User list / after Index)
Please check and comment. There should be no bugs, but who knows wink

add_faq_policy.zip version 1.0

Version 1.1
-fixed bug with language file path
-use forum_link()
add_faq_policy_1.1.zip version 1.1

Version 1.1.2
-fixed lang issue on message screens
add_faq_policy_1.1.2.zip

(I recommend to apply this modification/fix: http://punbb.informer.com/forums/topic/ … -php-css/)


***
add_faq_policy_1.1.zip
add_faq_policy_1.1.2.zip
(added by KeyDog as links above dead)

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: [Release] FAQ and Privacy policy

Works as advertised.  Thank you, sir.

Re: [Release] FAQ and Privacy policy

Thanks, but you are supposed to upload it on this site!:o

4 (edited by YonasH 2008-12-24 21:19)

Re: [Release] FAQ and Privacy policy

jamiet757 wrote:

Thanks, but you are supposed to upload it on this site!:o

ok, but where and how? ;P

thru wiki? :
http://punbb.informer.com/wiki/_media/p … policy.zip

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: [Release] FAQ and Privacy policy

one bug fixed (important when use with diferent language than English)

new version in first post

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: [Release] FAQ and Privacy policy

thanks i will try it

Re: [Release] FAQ and Privacy policy

needed something like this, thanks.

Re: [Release] FAQ and Privacy policy

any idea why I could be getting these kind of error messages


Notice: Undefined index: FAQ in /functions.php(466) : eval()'d code on line 20


Notice: Undefined index: Privacy in /footer.php(38) : eval()'d code on line 11


tried the same 1.1 extension on another board also and it was also undefined index faq and privacy but in misc.php - don't understand it...

Re: [Release] FAQ and Privacy policy

Maybe there's something wrong with the language files.

Undefined index means that array key doesn't exist.

Example:

<?php
error_reporting(E_ALL);
$foo = array();
echo $foo['bar'];

You get: "Undefined index: bar"

10 (edited by YonasH 2009-01-30 00:01)

Re: [Release] FAQ and Privacy policy

I'm doing some trick in this extension. Instead of adding new language array, I do this:

$lang_common['FAQ'] = 'FAQ';
$lang_common['Privacy'] = 'Privacy policy';

It's working fine on normal pages, but don't know why It causing errors on message windows (functions, calls to globals).
I will rebuild it this weekend smile
cheers

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

11

Re: [Release] FAQ and Privacy policy

YonasH wrote:

It's working fine on normal pages, but don't know why It causing errors on message windows (functions, calls to globals).

Does that mean you do know why or don't know why? (With you having mentioned the function globals part)?

Those keys are missing from the lang file, or that lang file isn't global within the respective function, if that was actually a question. big_smile

12

Re: [Release] FAQ and Privacy policy

@MattF
It's strange thing.
I'm loading my lang file in some common hook after loading common.php lang file (so it should be availablle everywhere).
Then message function is loading global $common_lang; So it should be there. But sometimes is not tongue

so:

MattF wrote:

that lang file isn't global within the respective function

wink


I will not dig for it, but just load my lang file inside those 2 hooks.

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

13

Re: [Release] FAQ and Privacy policy

KeyDog wrote:

any idea why I could be getting these kind of error messages

Notice: Undefined index: FAQ in /functions.php(466) : eval()'d code on line 20

Notice: Undefined index: Privacy in /footer.php(38) : eval()'d code on line 11

tried the same 1.1 extension on another board also and it was also undefined index faq and privacy but in misc.php - don't understand it...

Should be permanently fixed smile
New version in first post

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

14 (edited by KeyDog 2009-02-01 17:09)

Re: [Release] FAQ and Privacy policy

privacy policy gets printed twice now...
it's somehow being called twice and appears in footer twice...

tried on 2 different forums with the footer changes to footer.php


EDIT: With old footer.php it works - cool

but your other post must contain a mistake for footer.php big_smile

15 (edited by YonasH 2009-02-01 17:51)

Re: [Release] FAQ and Privacy policy

KeyDog wrote:

your other post must contain a mistake for footer.php

Read it carefully. I think that you didn't wink Beyond copyright part move its changes hooks too:

old

($hook = get_hook('ft_about_output_start')) ? eval($hook) : null;
($hook = get_hook('ft_about_pre_quickjump')) ? eval($hook) : null;

...
...

($hook = get_hook('ft_about_pre_copyright')) ? eval($hook) : null;

new

($hook = get_hook('ft_about_output_start')) ? eval($hook) : null;
($hook = get_hook('ft_about_pre_copyright')) ? eval($hook) : null;

...
...

($hook = get_hook('ft_about_pre_quickjump')) ? eval($hook) : null;

Maybe you missed one, and left other twice?


Or maybe you just have some trash in extensions cache? Try to clear it.
(in first release "Privacy Policy" link was displayed through different hook)

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

16

Re: [Release] FAQ and Privacy policy

yea maybe that big_smile

works fine now. thanks again.