xoops forums

Forum Index


Board index » All Posts (abrizan)




abrizan

Just popping in
Posted on: 2009/12/16 19:44
abrizan
abrizan (Show more)
Just popping in
Posts: 82
Since: 2005/11/14
#1

Re: Does a block or block-template know where it is positioned?

I would greatly appreciate it if this could be included in the next release. It would be very useful in my theme development.


abrizan

Just popping in
Posted on: 2009/12/16 17:08
abrizan
abrizan (Show more)
Just popping in
Posts: 82
Since: 2005/11/14
#2

Re: Does a block or block-template know where it is positioned?

I was hoping to find a more elegant Smarty solution and not a CSS or Javascript hack.
Is there really no way that this can achieved through Smarty?


abrizan

Just popping in
Posted on: 2009/12/16 13:40
abrizan
abrizan (Show more)
Just popping in
Posts: 82
Since: 2005/11/14
#3

Re: Does a block or block-template know where it is positioned?

Bump.
I have this same issue. I need my main menu block to output different html if it is left or right.

I even tried putting
<{assign var="Block_Position" value="canvas_left"}>
before the
<{foreach item=block from=$xoBlocks.canvas_left}>....
and
<{assign var="Block_Position" value="canvas_right"}>
befpre the
<{foreach item=block from=$xoBlocks.canvas_right}>.....
but no luck.

The main template "sees" <{$Block_Position}> but the block doesn't.

Is there any way to do this without a core hack?


abrizan

Just popping in
Posted on: 2009/3/4 15:21
abrizan
abrizan (Show more)
Just popping in
Posts: 82
Since: 2005/11/14
#4

Better Blocks

A few things always were a problem for me when designing templates. I haven't made any themes for months now so tell me if any of these have been handled.

1. I would like a way for a block's template to know if the block is left, right or center. I always have trouble making blocks which should look good in the left column also look good in the center. I would prefer a <{if (block_position eq "center") }> or something like that.

2. Block Cloning. XOOPS should have this builtin by now (A huge Thumbs up if it is). I was able to create an entire newspaper site with only 3 modules and a bunch of cloned blocks. The whole cloning process seemed too hackish and necessary for a modern CMS. http://www.hotlikepepperradio.com/cms/


abrizan

Just popping in
Posted on: 2008/3/31 16:34
abrizan
abrizan (Show more)
Just popping in
Posts: 82
Since: 2005/11/14
#5

Re: Using Xoops On A Old HTML Website

Believe it or not There are NO restrictions on what your site can look like using XOOPS however a lot of planning is required.

Check out these articles i wrote a long time ago on how to make a theme out of a html page
http://www.xoopstuner.com/xoops223a/m ... AMS/article.php?storyid=3
http://www.xoopstuner.com/xoops223a/m ... MS/article.php?storyid=12

It takes some effort but you can really unlock the true potential of xoops.

By the Way, you don't need any silly MODULES to add a page to xoops, just read this:
http://www.xoopstuner.com/xoops223a/m ... MS/article.php?storyid=11


abrizan

Just popping in
Posted on: 2007/5/11 22:11
abrizan
abrizan (Show more)
Just popping in
Posts: 82
Since: 2005/11/14
#6

How do I add a new preference to the system module?

I figured out a simple (and much needed) hack to use any installed editor for your comments.
I simply borrowed a block of code from the awesome wiwimod module and pasted it into /include/comment_form.php; that part works well.
For the other part of the hack I could only hard-code the preferred editor or store a selection in a Module preference, so I had to hack each module which uses it.

How do I add a new preference to the system module?
(xoops 2.016)


abrizan

Just popping in
Posted on: 2007/2/22 14:19
abrizan
abrizan (Show more)
Just popping in
Posts: 82
Since: 2005/11/14
#7

Re: Need some MySQL help

It was the queryF.
Can you recommend a good reference?
dev.xoops just don't have enough of this kinda info.


abrizan

Just popping in
Posted on: 2007/2/22 13:12
abrizan
abrizan (Show more)
Just popping in
Posts: 82
Since: 2005/11/14
#8

Re: Need some MySQL help

So sorry for not being clear.
$_GET['Del'] is holding the id of the record to be deleted but the SQL statement never gets executed. It just throws back stuff like this:

error: DELETE FROM xoops2016_tutorial_myform WHERE asID='5'

That statement seems fine to me.


abrizan

Just popping in
Posted on: 2007/2/22 4:51
abrizan
abrizan (Show more)
Just popping in
Posts: 82
Since: 2005/11/14
#9

Need some MySQL help

I'm finally doing my first module and ran into a SQL problem i just don't understand: The DELETE FROM command just don't seem to work.

if (isset($_GET['Del'])) {
    
//delete
    
$asID$_GET['Del'];
    
$query "DELETE FROM ".$xoopsDB->prefix("tutorial_myform")." WHERE asID='$asID' ";
    
$res=$xoopsDB->query($query);
    if(!
$res) {
        
$intro_text .= "error: $query";
    } else {
        
$intro_text .= "Record removed from DB!";
    }
}


INSERT and UPDATE queries work with very similar code blocks. I really need help with this one.


abrizan

Just popping in
Posted on: 2007/1/21 12:58
abrizan
abrizan (Show more)
Just popping in
Posts: 82
Since: 2005/11/14
#10

Re: How can I access all blocks from within my theme?

I also want help on this.



TopTop
(1) 2 »