Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Other - Discussion
Author Message
nextgen
Worker
Worker



Joined: Sep 28, 2006
Posts: 241

PostPosted: Sat Dec 26, 2009 5:39 pm Reply with quote

OK, the only thing i wish the next release would have is block control per module. Whether either block shows or not. Left or right or neither selectable under each modules edit page. Been hoping for this since day one.
 
View user's profile Send private message Send e-mail
wHiTeHaT
Life Cycles Becoming CPU Cycles



Joined: Jul 18, 2004
Posts: 579

PostPosted: Sun Dec 27, 2009 4:42 am Reply with quote

Nextgen .. this module excist : WB Block Manager

But you could extend your wish by asking it also can show up per page of a module or a single page.

If you not need a module and would be content to edit your blocks a little ( my correct way idea of it) see here
 
View user's profile Send private message Send e-mail
nextgen







PostPosted: Sun Dec 27, 2009 6:10 am Reply with quote

I was not sure that the WB Blocks manager would still work. I will give that a try my friend, How was your holidays , i hope well.
 
nextgen







PostPosted: Sun Dec 27, 2009 6:16 am Reply with quote

Wow, if this works like it looks like it should i would be the happiest guy in ravennuke land. This was the last piece of my perfect cms. Thanks for the link and resource wHiTeHaT
 
spiders
Regular
Regular



Joined: Jun 05, 2006
Posts: 90
Location: Aachen / Germany

PostPosted: Sun Dec 27, 2009 6:59 am Reply with quote

wHiTeHaT wrote:
Nextgen .. this module excist : WB Block Manager

But you could extend your wish by asking it also can show up per page of a module or a single page.

If you not need a module and would be content to edit your blocks a little ( my correct way idea of it) see here


Hi,
where can i find this module >> WB Block Manager << ?

I wish in a future release a Blocks- and Modules Administration with Ajax like Nuke Evolution Smile

_________________
[ Only registered users can see links on this board! Get registered or login! ] >> the global Web Content Management Services [ Only registered users can see links on this board! Get registered or login! ] >> My Raven24 Testside 
View user's profile Send private message Visit poster's website
wHiTeHaT







PostPosted: Sun Dec 27, 2009 9:51 am Reply with quote

i'm right now working on it spiders Wink
give me a few hours
 
spiders







PostPosted: Sun Dec 27, 2009 10:46 am Reply with quote

great Smile
 
wHiTeHaT







PostPosted: Mon Dec 28, 2009 5:08 pm Reply with quote

in WHAT i got myself into ....
a little while ago i see a jquery ui what could be used to control the blocks and modules for nuke.
While i'm getting more into jquery , i see so many options , i could better build a new cms.
I come to a point where i should deside to make what i above committed myself to.
Or i should finish osc2nuke V3 for ravennuke first.

Ofcourse a nice ajaxed UI for the blocks and modules would be cool , on the other hand?
How f@$i^ng much you go use it , once set it, it is setted , and you keep the positions as they are.

bah , i like to code to much.... replace the "HOURS" what where ment sarcastic , to "SOMEDAY MABY".

Sorry guy's
 
wHiTeHaT







PostPosted: Mon Dec 28, 2009 5:15 pm Reply with quote

ho btw , i took the wb blocksmanager v1.1 and made it to work with ravennuke 2.4 ( didnt need that much for it).
Let's see that as a start lol.

Bah.. now i'm doing it again.
 
spiders







PostPosted: Tue Dec 29, 2009 3:28 am Reply with quote

wHiTeHaT wrote:
in WHAT i got myself into ....
a little while ago i see a jquery ui what could be used to control the blocks and modules for nuke.
While i'm getting more into jquery , i see so many options , i could better build a new cms.
I come to a point where i should deside to make what i above committed myself to.
Or i should finish osc2nuke V3 for ravennuke first.

Ofcourse a nice ajaxed UI for the blocks and modules would be cool , on the other hand?
How f@$i^ng much you go use it , once set it, it is setted , and you keep the positions as they are.

bah , i like to code to much.... replace the "HOURS" what where ment sarcastic , to "SOMEDAY MABY".

Sorry guy's


It's a pity. Sad

I would do it myself if I could.

Can it be not to export from Evolution?
In Platinum, it was built from Evo.
 
wHiTeHaT







PostPosted: Tue Dec 29, 2009 11:53 am Reply with quote

I dont now how it looks like in platinum or evo , but i remember that there already excist a ajax based module for module control.
see http://phpnuke-downloads.com/PHPNuke_Ajax_Modules_Administration_v0.4-14-1126.html

and a ajax block manager
http://yahoobooters.org/modules.php?name=Downloads&d_op=viewdownloaddetails&ttitle=Ajax%20Blocks%20Editor%20v1.3&lid=2486
 
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Tue Dec 29, 2009 12:23 pm Reply with quote

Granting that there is no block control per module and that it's not AJAX and you can't drag blocks around, what else is lacking in the current Ravennuke approach to block management? You can basically rearrange all your blocks with a single request as long as you can do simple arithmetic (i.e., count) and conceptualize the four possible locations for blocks: left, center up, center down, and right.

And, thinking a little about it, what do you mean exactly by block control per module. Are you talking about the module that's active in home? In a lot of cases you can have several modules present on your home page at once so how would you want to specify the relationships between modules and blocks?
 
View user's profile Send private message Visit poster's website
wHiTeHaT







PostPosted: Tue Dec 29, 2009 1:11 pm Reply with quote

the relationship per module and block means that for example:
you can let show the top 10 weblinks block in the weblinks module only.
But also in the downloads module and NOT in the homepage.you can do this for each block on a module base.I can imagine many scenarios where this would be prefered.

Your idea abouth "multiple modules in the homepage" indeed could give an error in the homepage, but i didnt tested the multiple module in the homepage tweak/hack yet.
 
fkelly







PostPosted: Tue Dec 29, 2009 4:10 pm Reply with quote

That helps me understand it a bit more. Thanks. But, let's say (as I do on my own site) you have Gcalendar as the module in home. But you also show the last 5 articles block in the center up position, and perhaps the Content block and a few RSS blocks in the center down position(s), one under the other. Essentially then you are showing "content" from several modules on a single page by using blocks related to them. Only one module is "active in home" but that does not stop (nor should it IMHO) content from other modules from showing. Would the facility you are talking about even be relevant in this situation?

Humm ... I'm experimenting as I type. If I bring up some other module to my home page those other blocks like last 5 articles, Content and RSS don't show. They only show on the home page where Gcalendar runs as the home page module. Correct me if I'm wrong but this appears to be because when you run a single module by clicking on its url from the modules block you go through modules.php and the blocks(), render_blocks() and blockfileinc() functions of mainfile aren't invoked.

It appears to be the blocks() function which actually reads in the blocks from the blocks table. It then calls render_blocks() which in turn calls blockfileinc() and it's this last one that reads in the content from the actual block file. I also can't make any sense out of the bottom section of blockfileinc() which does this:

Code:
   if ($side == 1) {

      themecenterbox($blockfiletitle, $content);
   } elseif ($side == 2) {
      themecenterbox($blockfiletitle, $content);
   } else {
      themesidebox($blockfiletitle, $content);
   }


That first $side == looks to me like it's testing for the number one instead of the letter l. I don't see any circumstances where $side is ever set to anything besides l, c, d, or r except in the invokation of the blockfileinc function and there it is defaulted to a zero.

At any rate, anything you are going to do to implement this (associating blocks with modules) is going to get pretty intricate and I wish you the best.
 
wHiTeHaT







PostPosted: Tue Dec 29, 2009 4:45 pm Reply with quote

I think you still not 100% get it.

I try to create a scenario for you.

Let's say you have in your home the module "Gcalendar" (it doenst mather what module you have in your home setted for the blockmanager).

You can say in the blockmanager to have an X number and Y kind of blocks showing up for this module.

These same X and Y you can also add to the downloads module ,you can use multiple times the same block.

For me or anyone else , it dont mather to me or them if you put a weblinks block inside a Gcalendar module.

So:
Quote:
Only one module is "active in home" but that does not stop (nor should it IMHO) content from other modules from showing. Would the facility you are talking about even be relevant in this situation?

Yes indeed it is , it is a site customization tool.

The tool wont say: Hey you naughty boy.. you putted a weblinks block to a download module... youre a bad bad boy.

For your question abouth when or when not show the center-up-down blocks ( by default only in the home module) , you relate to the array number inside these block functions.



Code:


if (strtolower($side[0]) == 'l') {
      $pos = 'l';
   } elseif (strtolower($side[0]) == 'r') {
      $pos = 'r';
   }  elseif (strtolower($side[0]) == 'c') {
      $pos = 'c';
   } elseif  (strtolower($side[0]) == 'd') {
      $pos = 'd';
   }


Code:


$side[0]

1 or 2 isnt used , just 0 , but all is already covered by l,r,c,b
However i agree it isnt the best code for the blocks.

There should be used the tweak to show center-top/bottom blocks with wb manager
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Dec 29, 2009 4:52 pm Reply with quote

The blocks per module "hack" typically only deals with modules on the left and right and not center blocks.

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
wHiTeHaT







PostPosted: Tue Dec 29, 2009 5:06 pm Reply with quote

This is not 100% correct palbin
it indeed controls the top/bottom center blocks for the home module.
As i sayed you should use the hack to show center top and bottom blocks hack aswell if you want to use the full functionality.


but yes , in this enviroment, it is a hack with a module added to it.

LOL
 
fkelly







PostPosted: Tue Dec 29, 2009 5:20 pm Reply with quote

"I think you still not 100% get it. "

I'm an old man wHiteHat so bear with me. I guess I'm trying to understand what changes are needed to core RN code outside of the block manager and maybe also what table structure changes are needed. Like: here is the blocks table before the changes and here it is after and here are the fields we added and why. Same for modules table. Same for any other tables. Here is mainfile before and here is mainfile after and same for theme.phps if any changes are needed.

I can see where the additional capabilities would be useful. I'm less convinced about dragging blocks around the screen wysiwyg style as opposed to just typing numbers in to reorder them but of course I have some interest in the latter approach -- and as I say I'm an old guy and some of this new whiz bang stuff seems more cosmetic than substantive to me.
 
spiders







PostPosted: Wed Dec 30, 2009 1:24 am Reply with quote

spiders wrote:

I wish in a future release a Blocks- and Modules Administration with Ajax like Nuke Evolution Smile


Here a video:
[ Only registered users can see links on this board! Get registered or login! ]
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Dec 30, 2009 8:48 am Reply with quote

And with a true jQuery/AJAX implementation, even that screen refresh button wouldn't be needed. It would be an interesting starting point in terms of moving RN into the Web 2.0 era. While I agree with fkelly in principle that these things aren't really that "substantive" when compared with all the other clean-up work and enhancements that we have done so far, but, I am all for progress. I'd love to completely revamp the whole administration control panel myself. I love what a few other packages have done there (e.g., Wordpress, MOD-X)

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
fkelly







PostPosted: Wed Dec 30, 2009 10:19 am Reply with quote

Not to belittle progress, and it was interesting to look at the Youtube demo but in that context you don't really need Ajax at all. The block "positions" and names would be read into a Javascript array or arrays when the page loads. As you move them around their positions in the arrays would be changed. When you click submit the arrays would be used to update the blocks table. Yes, if you used Ajax and did the updates as you moved blocks on the page you wouldn't need a submit button at all but why? If you can keep the data on the client side within Javascript and they can still see the final position the blocks will have on the screen why bother with AJAX?

And to Spiders -- have you used blocks administration in a current Ravennuke release? Is the approach used in Nuke EVO really that much better.

And as to implementation, if we wanted we could probably, with due credit given, use the EVO javascript code. We could even, for a release or two, run the two approaches in parallel ... have a standard blocks and a blocks-wysiwyg administration icon both run on the ACP. The good part about the blocks-wysiwyg is that, as long as it updated the tables properly, there would be essentially zero chance that it would have negative effects on the rest of RN -- it's pretty much an isolated application.
 
wHiTeHaT







PostPosted: Wed Dec 30, 2009 10:42 am Reply with quote

In case of the WB blocksmanager , there's only 1 line in the rn mainfile what needs to be replaced and 1 global needs to be added at the function:
Code:


function blocks($side) {


add $name at the end of the globals line so it look like this:
Code:


function blocks($side) {
global $storynum, $prefix, $multilingual, $currentlang, $db, $admin, $user, $name;

then find
Code:
$result = $db->sql_query('SELECT * FROM '.$prefix.'_blocks WHERE bposition=\''.$pos.'\' AND active=1 '.$querylang.' ORDER BY weight ASC');

   


Replace with:
Code:


if (strlen($name) != 0) {
                    $name = str_replace(' ','_',$name);
                    $name = str_replace('%20','_',$name);

                    $result = $db->sql_query('SELECT b.bid, b.bkey, b.title, b.content, b.url, b.bposition, b.weight, b.active, b.refresh, b.time, b.blanguage, b.blockfile, b.view, b.groups, b.expire, b.action, b.subscription, b.max_rss_items FROM '.$prefix.'_blocks b, '.$prefix.'_blocks_manager m WHERE b.bid=m.bid AND m.title=\''.$name.'\' AND m.bposition=\''.$pos.'\' AND b.active=1 '.$querylang.' ORDER BY m.weight ASC');
                } else {
                    $result = $db->sql_query('SELECT b.bid, b.bkey, b.title, b.content, b.url, b.bposition, b.weight, b.active, b.refresh, b.time, b.blanguage, b.blockfile, b.view, b.groups, b.expire, b.action, b.subscription, b.max_rss_items FROM '.$prefix.'_blocks b, '.$prefix.'_blocks_manager m WHERE b.bid=m.bid AND m.title=\'admin\' AND m.bposition=\''.$pos.'\' AND b.active=1 '.$querylang.' ORDER BY m.weight ASC');
                }
   

The wb blockmanager has it's own admin module and db table.


For me it seems that the nuke evolution ajax blocks methode is based on nono's/bruno's blockmanager tweak made for osc2nuke, but i will not claim it is.
The wb blockmanager also holds credits from nono/bruno.

screenshot of wb blocksmanager
Image

original topic posted here at ravennuke:
http://www.ravenphpscripts.com/posts12154-highlight-wb+block+manager.html

i used the 1.1 version as the 1.2 isnt available anymore
 
Palbin







PostPosted: Wed Dec 30, 2009 11:42 am Reply with quote

I have something like the EVO block manager floating around. Someone (Nuken?) here did a layout, but lacked the JS knowledge to finish it. I wrote a lot of it in jQuery, but never finished it.

I'll load it up on my test site and see how far I got on it.
 
spiders







PostPosted: Wed Dec 30, 2009 11:46 am Reply with quote

wHiTeHaT wrote:
In case of the WB blocksmanager , there's only 1 line in the rn mainfile what needs to be replaced and 1 global needs to be added at the function:
Code:


function blocks($side) {


add $name at the end of the globals line so it look like this:
Code:


function blocks($side) {
global $storynum, $prefix, $multilingual, $currentlang, $db, $admin, $user, $name;

then find
Code:
$result = $db->sql_query('SELECT * FROM '.$prefix.'_blocks WHERE bposition=\''.$pos.'\' AND active=1 '.$querylang.' ORDER BY weight ASC');

   


Replace with:
Code:


if (strlen($name) != 0) {
                    $name = str_replace(' ','_',$name);
                    $name = str_replace('%20','_',$name);

                    $result = $db->sql_query('SELECT b.bid, b.bkey, b.title, b.content, b.url, b.bposition, b.weight, b.active, b.refresh, b.time, b.blanguage, b.blockfile, b.view, b.groups, b.expire, b.action, b.subscription, b.max_rss_items FROM '.$prefix.'_blocks b, '.$prefix.'_blocks_manager m WHERE b.bid=m.bid AND m.title=\''.$name.'\' AND m.bposition=\''.$pos.'\' AND b.active=1 '.$querylang.' ORDER BY m.weight ASC');
                } else {
                    $result = $db->sql_query('SELECT b.bid, b.bkey, b.title, b.content, b.url, b.bposition, b.weight, b.active, b.refresh, b.time, b.blanguage, b.blockfile, b.view, b.groups, b.expire, b.action, b.subscription, b.max_rss_items FROM '.$prefix.'_blocks b, '.$prefix.'_blocks_manager m WHERE b.bid=m.bid AND m.title=\'admin\' AND m.bposition=\''.$pos.'\' AND b.active=1 '.$querylang.' ORDER BY m.weight ASC');
                }
   

The wb blockmanager has it's own admin module and db table.


For me it seems that the nuke evolution ajax blocks methode is based on nono's/bruno's blockmanager tweak made for osc2nuke, but i will not claim it is.
The wb blockmanager also holds credits from nono/bruno.

screenshot of wb blocksmanager
Image

original topic posted here at ravennuke:
http://www.ravenphpscripts.com/posts12154-highlight-wb+block+manager.html

i used the 1.1 version as the 1.2 isnt available anymore


HI,with this, it is possible an individual blockposition per module?

If it is so, it sounds like good:-)
 
wHiTeHaT







PostPosted: Wed Dec 30, 2009 11:55 am Reply with quote

@ Spiders Yes it do.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Other - Discussion

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©