boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

b2customfields 2: Better custom post field functionality
Goto page 1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
Mystis



Joined: 02 Mar 2003
Posts: 74

PostPosted: Mon Jun 09, 2003 7:54 am    Post subject: b2customfields 2: Better custom post field functionality Reply with quote

Or how about 'b2customfieldserer'? Or maybe even 2 b2customfields 2 furious'?That's right, it's back! Back and better than ever. At least better than 2 fast 2 furious, trust me on that one. I believe I located the problem that seems to have caused about half the people who attempted to install it to get mysql errors, and I fixed it. I also wrote in some extra functionality that I'm sure you all will appreciate. Now, not only can you make a custom field that's an input box, but you can also make a textarea, select box, or checkbox! Let me know if you have any problems installing or anything, but this time should go over smoother than last time. Thanks!

Download here
Upgrade instructions here
_________________
- Mystis
[url=tidakada.com/board/viewtopic.php?t=3375]b2customfields v2[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2sql[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2quotes[/url]


Last edited by Mystis on Mon Jun 09, 2003 7:27 pm; edited 2 times in total
Back to top
View user's profile Send private message
bigsimon



Joined: 04 Jan 2003
Posts: 13

PostPosted: Mon Jun 09, 2003 9:03 am    Post subject: Reply with quote

Any chance you'll post instructions for an upgrade from an older version? I've been using it for quite some time now, but haven't a clue what I'd have to replace to get the new functionality.
_________________
bigSimon
Back to top
View user's profile Send private message
Mystis



Joined: 02 Mar 2003
Posts: 74

PostPosted: Mon Jun 09, 2003 2:45 pm    Post subject: Reply with quote

Your best bet for an upgrade is to completely uninstall the original b2customfields (just reverse all the steps of the original installation - instructions here - omit altering the database however), then run the following SQL query in place of Step 1:
Code:

ALTER TABLE `b2customfields` ADD `field_options` TEXT NOT NULL;
ALTER TABLE `b2customfields` ADD `field_type` TEXT NOT NULL;

Then, continue on with the installation process as normal. I wrote some very sloppy code in the first release, so it would be relatively painful to try and write proper upgrade instructions. That's one of the reasons that using this more recent version is relatively critical.
_________________
- Mystis
[url=tidakada.com/board/viewtopic.php?t=3375]b2customfields v2[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2sql[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2quotes[/url]
Back to top
View user's profile Send private message
xytx



Joined: 24 May 2003
Posts: 48

PostPosted: Tue Jun 10, 2003 4:15 pm    Post subject: Reply with quote

i installed the tables successfully, but they don't show up am i forgetting something? i also need a little understanding on how to add a function at the end do i use another <? ?> or i put it above the ?>
Back to top
View user's profile Send private message
Mystis



Joined: 02 Mar 2003
Posts: 74

PostPosted: Wed Jun 11, 2003 4:45 am    Post subject: Reply with quote

add the functions directly before the ?>, outside of any brackets. I'm not quite sure I understand you though with the database tables. What do you mean that they don't 'show up'?
_________________
- Mystis
[url=tidakada.com/board/viewtopic.php?t=3375]b2customfields v2[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2sql[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2quotes[/url]
Back to top
View user's profile Send private message
annia



Joined: 09 Apr 2002
Posts: 18

PostPosted: Wed Jun 11, 2003 7:13 am    Post subject: Reply with quote

How can I edit your hack so that it doesn't show anything in posts with empty additional fields.. all my old posts (before I installed the hack) now got empty
Current mood:
Current site:

entries under them.. :(
Back to top
View user's profile Send private message
Mystis



Joined: 02 Mar 2003
Posts: 74

PostPosted: Wed Jun 11, 2003 2:32 pm    Post subject: Reply with quote

Code:
Mood: <?php getcustomfield('mood'); ?>


If your template currently looks like that, replace it with this:

Code:
<?
$mood = getcustomfield('mood');
if(!empty($mood)){
     echo "Mood: ".$mood;
}
?>


If your field is not called 'mood', then edit the code accordingly.
_________________
- Mystis
[url=tidakada.com/board/viewtopic.php?t=3375]b2customfields v2[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2sql[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2quotes[/url]


Last edited by Mystis on Sat Jun 14, 2003 1:52 am; edited 1 time in total
Back to top
View user's profile Send private message
xytx



Joined: 24 May 2003
Posts: 48

PostPosted: Thu Jun 12, 2003 2:25 am    Post subject: Reply with quote

i tried installing it and i didnt even get the custom field part on the menu bar like i got b4. i dont have the code right now cause i put my regular files back. but i added the function before the ?> and outside of the last bracket on that function, and it still wouldnt work. i'll try again tho.
Back to top
View user's profile Send private message
Mystis



Joined: 02 Mar 2003
Posts: 74

PostPosted: Thu Jun 12, 2003 6:01 pm    Post subject: Reply with quote

xytx wrote:
i tried installing it and i didnt even get the custom field part on the menu bar like i got b4. i dont have the code right now cause i put my regular files back. but i added the function before the ?> and outside of the last bracket on that function, and it still wouldnt work. i'll try again tho.


Then you missed the 6th step:

Quote:
__________________________________________________________________________
| |
| Step 6: Open up the file b2-include/b2menutop.txt. Before the '***', |
| add the following line. Adjust the '10' to reflect the minimum level |
| the user needs to access the section in the administrative panel: |
| between 0 and 10. I reccomend leaving it at 10, unless you have a co- |
| administrator. |
|__________________________________________________________________________|

10 b2fields.php Custom Fields

_________________
- Mystis
[url=tidakada.com/board/viewtopic.php?t=3375]b2customfields v2[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2sql[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2quotes[/url]
Back to top
View user's profile Send private message
blog17



Joined: 28 Jan 2003
Posts: 144
Location: London, UK

PostPosted: Thu Jun 12, 2003 8:16 pm    Post subject: Reply with quote

I prefer b2customfields Reloaded.
_________________
Check this out! The ULTIMATE site!
Back to top
View user's profile Send private message Visit poster's website
joni



Joined: 13 Jun 2003
Posts: 2

PostPosted: Fri Jun 13, 2003 9:50 pm    Post subject: Reply with quote

i tried installing it, but when i went to the login page, i got this error:

Code:

Warning: Cannot modify header information - headers already sent by (output started at /home/joni/public_html/b2-include/b2functions.php:1344) in /home/joni/public_html/b2login.php on line 294

Warning: Cannot modify header information - headers already sent by (output started at /home/joni/public_html/b2-include/b2functions.php:1344) in /home/joni/public_html/b2login.php on line 295

Warning: Cannot modify header information - headers already sent by (output started at /home/joni/public_html/b2-include/b2functions.php:1344) in /home/joni/public_html/b2login.php on line 296

Warning: Cannot modify header information - headers already sent by (output started at /home/joni/public_html/b2-include/b2functions.php:1344) in /home/joni/public_html/b2login.php on line 297

Warning: Cannot modify header information - headers already sent by (output started at /home/joni/public_html/b2-include/b2functions.php:1344) in /home/joni/public_html/b2login.php on line 298


i'm pretty sure that i followed the steps correctly, so could somebody please tell me what went wrong?
Back to top
View user's profile Send private message
Candle



Joined: 23 Dec 2002
Posts: 547

PostPosted: Fri Jun 13, 2003 10:10 pm    Post subject: did this Reply with quote

did this turn in to vaporware ?
http://tidakada.com/board/viewtopic.php?t=2734
_________________
My Game Forum
Back to top
View user's profile Send private message
xytx



Joined: 24 May 2003
Posts: 48

PostPosted: Sat Jun 14, 2003 1:44 am    Post subject: Reply with quote

nevermind i got it, its a great hack mystis!
Back to top
View user's profile Send private message
Mystis



Joined: 02 Mar 2003
Posts: 74

PostPosted: Sat Jun 14, 2003 1:49 am    Post subject: Reply with quote

joni wrote:
i tried installing it, but when i went to the login page, i got this error:

Code:

Warning: Cannot modify header information - headers already sent by (output started at /home/joni/public_html/b2-include/b2functions.php:1344) in /home/joni/public_html/b2login.php on line 294

Warning: Cannot modify header information - headers already sent by (output started at /home/joni/public_html/b2-include/b2functions.php:1344) in /home/joni/public_html/b2login.php on line 295

Warning: Cannot modify header information - headers already sent by (output started at /home/joni/public_html/b2-include/b2functions.php:1344) in /home/joni/public_html/b2login.php on line 296

Warning: Cannot modify header information - headers already sent by (output started at /home/joni/public_html/b2-include/b2functions.php:1344) in /home/joni/public_html/b2login.php on line 297

Warning: Cannot modify header information - headers already sent by (output started at /home/joni/public_html/b2-include/b2functions.php:1344) in /home/joni/public_html/b2login.php on line 298


i'm pretty sure that i followed the steps correctly, so could somebody please tell me what went wrong?


It appears that you bungled the step where you add functions to b2functions.php. If you want to package up the file and mail them my way (me@meforme.net) I'll take a look at it for you.
_________________
- Mystis
[url=tidakada.com/board/viewtopic.php?t=3375]b2customfields v2[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2sql[/url] | [url=tidakada.com/board/viewtopic.php?t=3375]b2quotes[/url]
Back to top
View user's profile Send private message
joni



Joined: 13 Jun 2003
Posts: 2

PostPosted: Sat Jun 14, 2003 3:57 am    Post subject: Reply with quote

nevermind. i finally found out what went wrong. thanks for offering to help, though. Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Goto page 1, 2, 3, 4, 5, 6, 7  Next
Page 1 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group