UID and Bitfield

Discuss the development of future releases of phpBB (phpBB 3.x minor releases) and MODing/Coding related questions.
User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

UID and Bitfield

Postby Gingah » 21 May 2009, 14:25


Xanta
New member
New member
Posts: 3
Joined: 28 Jan 2009, 20:02
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UID and Bitfield

Postby Xanta » 22 May 2009, 15:43

You can't just echo those fields, you need to use the generate_text_for_display function which interprets the 3 fileds together.

Take a look at this wiki post: http://wiki.phpbb.com/Parsing_text

User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: UID and Bitfield

Postby Gingah » 22 May 2009, 18:06


User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: UID and Bitfield

Postby Obsidian » 22 May 2009, 23:59

Try using and not echo, it sometimes gives better results and more information.

How you're seeing it, also, is how it will appear in the database. If you want to see it, parsed and all, run it through generate_text_for_display(), trust me, it works. I've used it quite often.

User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: UID and Bitfield

Postby Gingah » 23 May 2009, 11:19


User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: UID and Bitfield

Postby Obsidian » 23 May 2009, 13:55

Actually, you might want to take a look at this then. It handles all that for you.
http://code.assembla.com/phpbb-xerxes/s ... zephyr.php

User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: UID and Bitfield

Postby Gingah » 23 May 2009, 17:33

That file, zephyr.php, has a lot more functionality than I need to just parse bbcode. The only problem I've run into so far is getting the uid and bitfield working, so I can use them along with the bbcodes (for the database).

User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: UID and Bitfield

Postby Obsidian » 23 May 2009, 18:59


User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: UID and Bitfield

Postby Gingah » 23 May 2009, 22:51


User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: UID and Bitfield

Postby Obsidian » 23 May 2009, 23:23

Uh, just to make sure, you are passing vars through the GET or POST superglobals for the text, correct?
If you aren't, the parser won't generate the UID or bitfield. ;)

User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: UID and Bitfield

Postby Gingah » 23 May 2009, 23:45


User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: UID and Bitfield

Postby Obsidian » 24 May 2009, 02:32


User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UID and Bitfield

Postby igorw » 24 May 2009, 10:44

No, don't access the superglobals directly. request_var should be used, and from what I can tell it is being used correctly. :|

- we're poor!

User avatar
Gingah
New member
New member
Posts: 22
Joined: 21 May 2009, 13:59
Contact:

Re: UID and Bitfield

Postby Gingah » 24 May 2009, 11:08

Even if I set it to $POST['text'] = 'loremipsumdoloretcetera', or when using just $text, it still does not produce any result in the var_dump's. Are there any other prequisites for using generate_text_for_storage, other than needing access to the functions definiton? Such as needing to be logged into phpbb etc.

Xanta
New member
New member
Posts: 3
Joined: 28 Jan 2009, 20:02
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: UID and Bitfield

Postby Xanta » 27 May 2009, 22:27



[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “phpBB Development discussion”

Who is online

Users browsing this forum: No registered users and 14 guests