Recent Topics

1 Feb 03, 2007 05:32    

Yeah basic question, and hopefully i'll get a awesome answer.

One thing that I would love would be the ability to do this;


$Blog = & new Blog($blog);
$Post = & new Post();
$Post->set('title', 'Some Title');
$Post->set('body', 'sadada');
// ...
$Post->set('blog', $Blog->id);
$Post->create();
echo 'We just created the post: '.$Post->get('title, 'htmlbody').'<br />You can edit it below.';
echo $Post->display('update');

I already have a database system to do this (i can share if you want), but it would be great if b2evo went in this direction as well.

2 Feb 03, 2007 11:50

	$fred = & new Item();
	$fred->set( 'title', 'hello world' );
	$fred->set( 'content', 'Yet another hello world post' );
	$fred->set( 'main_cat_ID', 228 );
	$fred->dbinsert();

¥

3 Feb 03, 2007 12:38

What about the first part with loading up a blog from a id?

Another thing, is when say a delete occurs so $Blog->delete(); it should delete all things that are referenced to that blog.

4 Feb 03, 2007 12:53

To load a blog from an id you just need to get it from the cache :-

$Peter = $BlogCache->get_by_ID( 2 );

I'm assuming that deleting a blog will remove all relevant posts/comments/categories as well.

¥

5 Feb 03, 2007 13:03

Ok how about this:


$BlogList->add($blog);
$BlogList->remove($blog2);
$BlogList->clear();

6 Feb 03, 2007 13:16

I think you'd be lucky if it worked :p

¥

7 Feb 03, 2007 13:25

¥åßßå wrote:

	$fred = & new Item();
	$fred->set( 'title', 'hello world' );
	$fred->set( 'content', 'Yet another hello world post' );
	$fred->set( 'main_cat_ID', 228 );
	$fred->dbinsert();

¥

Are you serious? It'd be that easy to, for example, have a form where someone can post a youtube video code then have the form be $fred and automagically post itself? Assuming of course there was enough smarts to do the youtube brackety thing. Holy smokes that'd be da bomb.

BTW I believe 2.0 will have an integrated beer tap that'll serve Fosters. That's the direction *I* intend to see b2evo take, though Francois might have different ideas.

8 Feb 03, 2007 13:27

Yeah well i know it doesn't work because i had to do this;
http://forums.b2evolution.net//viewtopic.php?p=50265#50265

Which personman has used in his own stuff as well.

But will it be possible in b2evo v2, plus we still haven't answered the question of what direction is it going, and what the new stuff / changed stuff will be, maybe a wiki roadmap would be a good idea :)

9 Feb 03, 2007 13:31

Are you serious? It'd be that easy to, for example, have a form where someone can post a youtube video code then have the form be $fred and automagically post itself? Assuming of course there was enough smarts to do the youtube brackety thing. Holy smokes that'd be da bomb.

Your thinking on a whole different .... not level... plant here EdB ;) I'm talking purely OOP here, no html, no forms, just pure php oop apps.

BTW I believe 2.0 will have an integrated beer tap that'll serve Fosters. That's the direction *I* intend to see b2evo take, though Francois might have different ideas.

Geeze that would be a good feature... EdB you should start working on it right now :D

10 Feb 03, 2007 13:38

Yeah well i know it doesn't work because i had to do this;
http://forums.b2evolution.net/...0265#50265

Well I know it works because I tested it ..... but you didn't ask how to add an item to the mainlist, just how to create one ;)

EdB wrote:

BTW I believe 2.0 will have an integrated beer tap that'll serve Fosters. That's the direction *I* intend to see b2evo take, though Francois might have different ideas.

Yay, lets create our own branch :D

¥

11 Feb 03, 2007 13:41

¥åßßå wrote:

Yeah well i know it doesn't work because i had to do this;
http://forums.b2evolution.net/...0265#50265

Well I know it works because I tested it ..... but you didn't ask how to add an item to the mainlist, just how to create one ;)

Yeah well, with all these emails we got flying around the last 10 minutes it's ok if i got confused :P

¥åßßå wrote:

EdB wrote:

BTW I believe 2.0 will have an integrated beer tap that'll serve Fosters. That's the direction *I* intend to see b2evo take, though Francois might have different ideas.

Yay, lets create our own branch :D

¥

Haha well if we just create a branch for that, might as well call it a brewery ;) Maybe just a plugin ;)

12 Feb 03, 2007 13:44

lol @ confused .... I blame the extreeme testing of the new branch :D

¥

13 Feb 03, 2007 14:03

Ultimately my friend the entire goal of the app is to serve up good old fashioned html to a visitor. All else is steps along the path.

Okay so a semi-serious answer to your question. I get to play on an email list. That means I read stuff I don't understand and occasionally say something very few people care to read, but it's stuff about b2evo that includes the dev team. And a few other players. I'm there because I do the antispam thing. And have done a bunch of skin work. And play here a lot. I was identified as one of the very few players in that group who actually uses b2evo as a blog, which is funny because I rarely use it to post anything, but I digress.

Without making any promises of any kind, I think I can safely say that the primary goal of v2.0 will be the complete removal of ALL original b2 code. That's an important milestone to Francois. At the same time you'll see a lot more movement towards an easier-but-not-dummer user interface. LOTS of ideas have been kicked around for what that actually means, and you're starting to see it in 1.9.2. For example notice how now there's a "simple" and "expert" tab when writing a blog post? A few releases ago we saw different ways to organize posts - posts list and full posts. Comments can still be found at the post they're part of, but now there's a comments tab to make finding them easier. You've also noticed, I'm sure, that each blog can pick it's skin from a visual representation instead of a list. More subtabs is a bit more complex, but it's easier for the blogger to figure out where stuff is that way. So the end user benefits from the added level of interface.

At the level you like to think of things you'll have to excuse me because it's all blahblahblah to me. Objects are obviously the way, but I'm just parroting big words there. I think you'll continue to find it easier to work within going forward, but that's only a guess because the further this thing goes the more lost I become.

Again NONE of this is a promise or a commitment of any kind. The last time I played with CVS was when 1.6 was turning into 1.7 okay? So I have no idea what's really coming. I don't play there, but I pay attention to what's up in the dev team. So having said that, envision if you will what will make the application both smarter and easier. How about a total overhaul of the back office so that you start with a start page that summarizes all your goings-on and gives you quick access to all the features you'll probably want to use. Imagine of course that everything else and the kitchen sink is still there - just not at the same level as the first level you reach "back there". How many times have you heard complaints about how blog #1 is just too confusing for people to grok? So imagine if people could say "I don't want it doing that" and - poof - it no longer does what it does. Think of all the issues people have with the 'collaborative' aspect of b2evolution, and again imagine being able to say "stop that from being so" and - poof - it isn't what it is anymore.

But for you it's all about OOP so you'll be in heaven no matter what the end user does. My tired old brain just can't wrap around how apps do their thing anymore, so I will end up waiting for someone like you to make half a dozen complex dynamic plugins that I can pull bits and pieces from to make a tiny little doo-dad then cheer for myself when it happens to be something popular ;)

So yeah let's fork this puppy. We could call it b2ewery eh? (this bit added because I previewed and saw that y'all have added half a dozen replies while I typed)

14 Feb 03, 2007 14:15

Haha b2ewery sounds like b2ewwwwry ;) hehe took me a while to find out the relevance to brewery ;)

For the future, thanks for all that, it's great to see you always posting really long posts :)

Yeah the OOP will always progress, but it's good to know where it's going to go, as right now, and with some of the changes i'm like, grrr why did they do that, that makes some stuff harder for me / my vision.

Like yeah with the skin previews that are now present, thats great, but for people like me that eventually want to move skins to plugins it's not so good, or at least with my current amount of thought put into it.... I need to think more about my vision, eg. skinning and plugins, and really find out what the future holds for them, so i don't end up doing something that turns out useless again, like the Lightality project. With that i did all this stuff, then bang, plugins made a appearance and i figured, if i release this, it would cause a lot of problems as we would be going backwards. So yeah, I still want that Panels Plugins out the door, I still want Skins to be Plugins, just I need to put more thought into how i'm going to do this, and what the future holds for them to make sure that i'm not conflicting with any one elses plans....

Wow that's a long post... Guess it's the beer that causes that eh?

15 Feb 03, 2007 14:28

Skins are almost a plugin as they are right? Except they don't go to the plugins directory. You upload it to the place it belongs and decide if you want to select it or not. Inside skins we're seeing a lot of stuff that used to be files become plugins (calendar and archives for example), and that whole "switch $disp" thing moved out of _main and set up camp as an included file. So now a skin's _main is, in terms of percentage, much more the place to do the tweaking.

Yeah it's a pain to try to guess where the thing goes next. I've been playing since 0.8.9 and each major change has been for the better but hasn't exactly been predictable. Each time it's like "you did what? now my thing has to be done all over differently again!". Such is life eh?

16 Feb 03, 2007 14:34

Yeah, but the benifits of skins being plugins is that they can then have settings, and also take advantage of b2evo events.

Yeah like with the sidebar item plugins, or as I call panels, that was one of those annoying but for the better changes I guess, as I was nearly done with my Panels stuff, did a lot of work on it, and then bang I see they started doing that and I was grrrr!

I will be looking into Panels over the coming weeks again and have been looking into it over the past few days. Isn't it great having free time again!!!

One annoying thing is that there are so many ways to submit plugins, theres the forum, theres the main page, theres the wiki, theres the authors blog, theres the authors portfolio, kind of makes you feel like not doing it which is what i tend to do... and just post them in the forum...

edit: anyway i'm hitting the hay, nice ranting session :)

17 Feb 04, 2007 05:10

I wait that we can trigger events automagically, without having to write that on the skin.

I have made a port from wordpress sharethis (http://devlog.waltercruz.com/share_this_para_b2evolution on portuguese, I will translate it to english), and I need to insert the trigger event for SkinBeginHtmlHead because my skin don't had that. (I needed to insert a $Plugins->call_by_code, but that is another history :) )

It's not painfull, but it would be good if the plugin was triggered withou that explicit reference in the skin (except for the calls to $Plugins->call_by_code).

When I made the translation of the plugin to b2evo, I find the extensive documentation to developers really great. I like that.

[]'s
- Walter

18 Feb 04, 2007 06:57

I didn't actually think we had a "well made" documentation yet, i only thought we had the tech docs and example plugins. So i'm interested in what your referring to. And great you are making plugins. As for your suggestion, I can't see how that would be possible... A event needs to be triggered, you simple can't softcode a trigger... unless you know how?

19 Feb 04, 2007 14:04

Althou our documentation could't be very well, is pretty well than oher projects.

It's what ohloh says :) "Across all PHP projects on Ohloh, 24% of all source code lines are comments. For b2evolution, this figure is 40%.

This very impressive number of comments puts b2evolution among the best 10% of all PHP projects on Ohloh. " http://www.ohloh.net/projects/3514/factoids/68013

Wordpress has 'few sources comments' :> and is not totally OO :)

Maybe we should make a better user documentation :)

20 Feb 04, 2007 14:10

Yeah I will be working on the plugins documentation over the coming weeks.

21 Apr 15, 2007 00:06

Walter wrote:

Across all PHP projects on Ohloh, 24% of all source code lines are comments. For b2evolution, this figure is 40%.

Please note that a lot of the comments are CVS commit logs and file headers with license/formal stuff.


Form is loading...