Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
wHiTeHaT
Life Cycles Becoming CPU Cycles



Joined: Jul 18, 2004
Posts: 579

PostPosted: Fri Jul 10, 2009 7:19 am Reply with quote

Hello @all

I'm working on the themecp panel to use with themes i early ported over to ravennuke.

I've tweaked the themes so that it is posseble to either show a center up or a center down block to the right side of my theme for example:

center up block
leftblock||rightblock
center down block

Or simply see here [ Only registered users can see links on this board! Get registered or login! ]
however i want to be able to override the default settings and show a particular block in the original center position.

For that i require to retrieve the block's name

Code:


head();
include_once 'includes/counter.php';
if (defined('HOME_FILE')) {
   message_box();
  if ($themeCB_Top == 0) *** make an AND + block name here*** {
    blocks('Center');
   }
}

So as you might notice if set the $themeCB_Top to 0 ( inside the theme.php)
It will show the original methode.
 
View user's profile Send private message Send e-mail
duck
Involved
Involved



Joined: Jul 03, 2006
Posts: 273

PostPosted: Fri Jul 10, 2009 9:37 am Reply with quote

Very interesting idea and concept and I like it very much. I am thinking if it were me to make for bettor dynamics why not make a 5th block function called content blocks (or something like that) then if necessary modify the blocks table (although I doubt actual modification of it's table structure would be necessary) then modify your blocks admin functions to permit this 5th block type then just call the 5th (or 5th and 6th ie contentup contentdown) in the theme. Doing it this way would mean you can play and add subtract blocks at will thru admin rather than having to recode the theme each change.
 
View user's profile Send private message
wHiTeHaT







PostPosted: Fri Jul 10, 2009 9:52 am Reply with quote

That is what i treid to do.

As i made these templates a year ago , i totaly forgot what i have done and confuses me Embarassed
 
mars
Worker
Worker



Joined: Jul 08, 2006
Posts: 123
Location: Bloomsburg,Pennsylvania

PostPosted: Fri Jul 10, 2009 10:01 am Reply with quote

I hate to say it but you are trying to duplicate what AutoTheme already does..

_________________
Visit Our PHPNuke Theme Site 
View user's profile Send private message Visit poster's website
wHiTeHaT







PostPosted: Fri Jul 10, 2009 10:02 am Reply with quote

i need a methode to include a block without hardcode the content of the block into the theme.
And without using the original methode.
 
wHiTeHaT







PostPosted: Fri Jul 10, 2009 10:03 am Reply with quote

lol sorry to say , but i dont like autotheme , autotheme is to create themes (originaly)
and not to manipulate by a click.

also did you checked the size of autotheme?
to much resources needed , it is to overdone in my opinion.
 
mars







PostPosted: Fri Jul 10, 2009 10:13 am Reply with quote

The size? the size of the entire module is under a megabyte..

It is a small module, and does have complete block control.
You can put any block, in any position, based on any criteria, even down to the module.
You can use images in place of block titles, you can have custom html for each block.
Unlimited custom block positions too..

But I am not trying to knock what you are doing, just trying to let you know it is done already..
 
wHiTeHaT







PostPosted: Fri Jul 10, 2009 10:32 am Reply with quote

I apreciate your information , however it isnt the same as what my idea of the whole concept is.
As i said autotheme is to create themes either have all the options you mentioned or not , however , it is its purpose.

My intention is to manipulate excisting themes and eventualy strip out the whole theme control out of (raven)nuke's kernel.

to give you an idea check phpbb3's template engine
 
duck







PostPosted: Fri Jul 10, 2009 10:42 am Reply with quote

mars wrote:
I hate to say it but you are trying to duplicate what AutoTheme already does..


But Autotheme is not free so there is no duplication then, If Autotheme were an Open Source Solution then looking at Autotheme would be an option but it is not. If you know of any Open Source solutions then you can claim duplication of function cause then end users would have a free alternative to try. As is it is not.
 
mars







PostPosted: Fri Jul 10, 2009 10:44 am Reply with quote

Yes it is.
The free lite version does everything that the commercial version does except for caching.
 
wHiTeHaT







PostPosted: Fri Jul 10, 2009 10:46 am Reply with quote

Ok.. now we discussed autotheme , could we stay to the original post pls
 
wHiTeHaT







PostPosted: Fri Jul 10, 2009 11:05 am Reply with quote

Ok i think i'm close to something * euhm euhm*

As i work since a long time with nuke i still come to surprises when i try to locate something.

As for now i try to find where it is told
blocks(Down)
Blocks(Center)
Blocks(left)
blocks(right)

where it is written to use Center,Down,left,right , i can only find in mainfile l,r,c,d

??????
 
warren-the-ape
Worker
Worker



Joined: Nov 19, 2007
Posts: 196
Location: Netherlands

PostPosted: Fri Jul 10, 2009 11:21 am Reply with quote

Would this be a module or something you hack into your theme?

I always liked the blog like lay-out where you can combine either 1 or 2 blocks into 1 column, next to your main content.
It would be something I'd like to use for a new theme.
 
View user's profile Send private message
wHiTeHaT







PostPosted: Fri Jul 10, 2009 11:22 am Reply with quote

Ja aap , that's it gonna be
 
wHiTeHaT







PostPosted: Fri Jul 10, 2009 11:34 am Reply with quote

I got it... it is working perfectly take a look aap
 
duck







PostPosted: Fri Jul 10, 2009 11:39 am Reply with quote

looks great! Good Job.

How about an full explanation of your approach?
 
wHiTeHaT







PostPosted: Fri Jul 10, 2009 11:47 am Reply with quote

i had to adapt the mainfile and did for now a manual database insertion.
I also needed to adapt header.php + footer.php , however i already needed to edit these 2 in first place.

As i for now just did a test ( couse it is working now the other way around) i want to complete the whole part.

just to give you an idea i go post you the mainfile.php , what needed the most edits , i'm also not 100% i did it correctly , there are also other things involved i might looked over.
for example the url rewrite part or headlines etc etc.
anyway take a look:

mainfile as text

link now works
 
wHiTeHaT







PostPosted: Fri Jul 10, 2009 1:25 pm Reply with quote

Cool

Package is complete and need testers

Download the pack here

BACKUP YOUR INVOLVED FILES

mainfile.php
header.php
footer.php
admin/modules/blocks.php


no language included

in admin blocks you will see options:
_CENTERUP2
_CENTERDOWN2

Ravennuke version used: 2.30.02
 
horrorcode
Involved
Involved



Joined: Jan 17, 2009
Posts: 272
Location: Missouri

PostPosted: Fri Jul 10, 2009 7:55 pm Reply with quote

Hi. Can you better describe what the functions of this are? Im just a little confused, when I look at the link you posted it looks like a normal nuke layout.

Can you post some screenshots maybe?
 
View user's profile Send private message
wHiTeHaT







PostPosted: Fri Jul 10, 2009 7:57 pm Reply with quote

ho i'm sorry i was checking site.. look again and you see
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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 ©