1
dukehen
Code syntax error?
  • 2004/6/26 3:09

  • dukehen

  • Just popping in

  • Posts: 91

  • Since: 2003/12/9


In my struggles to find out why my centerblock section outputs nothing, I thought I would try here.

-----------------------------------
My code for the center section is:



<{if $xoops_showcblock == 1}>
<{foreach item=block from=$xoops_ccblocks}>
<{include file="alter/centerblock.html"}>
<{/foreach}>



<{foreach item=block from=$xoops_clblocks}>
<{include file="alter/lcenterblock.html"}>
<{/foreach}>



<{foreach item=block from=$xoops_crblocks}>
<{include file="alter/rcenterblock.html"}>
<{/foreach}>


<{/if}>


-----------------------------------
This is the output of my page:




-----------------------------------

Now, it seems to be dying on the first IF statement. I have tried adding comments to later lines, but none of them show on the output. I assume XOOPS is dying right at the IF statement. I don't see anything wrong with it, considering I DO HAVE center content...?

2
dukehen
Darn, stumped!
  • 2004/6/29 19:44

  • dukehen

  • Just popping in

  • Posts: 91

  • Since: 2003/12/9


No ideas?

3
Mithrandir
Re: Darn, stumped!

are you sure no php debug errors occur?
The information which should go in the center is in the smarty variables, when you turn on smarty debug?
All SQL queries are executed and without errors?

4
dukehen
Re: Darn, stumped!
  • 2004/6/29 20:01

  • dukehen

  • Just popping in

  • Posts: 91

  • Since: 2003/12/9


1. no php errors
2. MySQL page kicked this out:
-------------------------------
Queries
SELECT * FROM xoops_config WHERE (conf_modid = 0 AND conf_catid = 1) ORDER BY conf_order ASC
SELECT sess_data FROM xoops_session WHERE sess_id = '5b87cb33c07c10f63049b16df96ea4ce'
SELECT * FROM xoops_users WHERE uid=1
SELECT * FROM xoops_modules WHERE dirname = 'system'
SELECT * FROM xoops_modules WHERE dirname = 'system'
SELECT * FROM xoops_configcategory
SELECT * FROM xoops_group_permission WHERE (gperm_name = 'module_admin' AND gperm_modid = 1 AND (gperm_groupid = 1 OR gperm_groupid = 2))
Total: 7 queries

Blocks
Total: 0 blocks

Execution Time
XOOPS took 0.13345694541931 seconds to load.

Extra
---------------------------
3. I don't know what I should look for specifically in the smarty output.

I know that if I use the default theme, I get my middle news block...

Thanks for any help rendered!

5
dukehen
Re: Darn, stumped!
  • 2004/6/29 20:12

  • dukehen

  • Just popping in

  • Posts: 91

  • Since: 2003/12/9


Now, when I switch theme to default, it adds these specific queries:

--------------------
SELECT b.* FROM xoops_newblocks b, xoops_block_module_link m WHERE m.block_id=b.bid AND b.isactive=1 AND b.visible=1 AND m.module_id IN (0,3,-1) AND b.bid IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) ORDER BY b.weight,b.bid
SELECT COUNT(*) FROM xoops_priv_msgs WHERE (read_msg = 0 AND to_userid = 1)
SELECT f.*, s.tpl_source FROM xoops_tplfile f LEFT JOIN xoops_tplsource s ON s.tpl_id=f.tpl_id WHERE (tpl_tplset = 'alter' AND tpl_file = 'system_block_user.html') ORDER BY tpl_refid
SELECT * FROM xoops_tplfile WHERE (tpl_tplset = 'alter' AND tpl_file = 'system_block_user.html') ORDER BY tpl_refid
SELECT * FROM xoops_modules WHERE (hasmain = 1 AND isactive = 1 AND weight > 0) ORDER BY weight ASC, mid ASC
SELECT * FROM xoops_group_permission WHERE (gperm_name = 'module_read' AND gperm_modid = 1 AND (gperm_groupid = 1 OR gperm_groupid = 2))
SELECT f.*, s.tpl_source FROM xoops_tplfile f LEFT JOIN xoops_tplsource s ON s.tpl_id=f.tpl_id WHERE (tpl_tplset = 'alter' AND tpl_file = 'system_block_mainmenu.html') ORDER BY tpl_refid
SELECT * FROM xoops_tplfile WHERE (tpl_tplset = 'alter' AND tpl_file = 'system_block_mainmenu.html') ORDER BY tpl_refid
SELECT topic_id, topic_title FROM xoops_topics WHERE topic_pid=0 ORDER BY topic_title
SELECT * FROM xoops_topics WHERE topic_pid=1
SELECT * FROM xoops_stories WHERE published > 0 AND published <= 1088541671 AND (expired = 0 OR expired > 1088541671) AND ihome=0 ORDER BY published DESC LIMIT 0, 5
SELECT * FROM xoops_topics WHERE topic_id=1
SELECT * FROM xoops_users WHERE uid=1
SELECT * FROM xoops_smiles
SELECT COUNT(*) FROM xoops_stories WHERE published > 0 AND published <= 1088541671 AND (expired = 0 OR expired > 1088541671) AND ihome=0
SELECT * FROM xoops_xoopsnotifications WHERE (not_modid = 3 AND not_category = 'global' AND not_uid = 1) ORDER BY not_id ASC
SELECT * FROM xoops_config WHERE (conf_modid = 3) ORDER BY conf_order ASC
SELECT * FROM xoops_modules WHERE mid = 3
SELECT * FROM xoops_config WHERE (conf_modid = 3) ORDER BY conf_order ASC
SELECT * FROM xoops_config WHERE (conf_modid = 3) ORDER BY conf_order ASC
SELECT * FROM xoops_config WHERE (conf_modid = 3) ORDER BY conf_order ASC
SELECT f.*, s.tpl_source FROM xoops_tplfile f LEFT JOIN xoops_tplsource s ON s.tpl_id=f.tpl_id WHERE (tpl_tplset = 'alter' AND tpl_file = 'news_index.html') ORDER BY tpl_refid
SELECT * FROM xoops_tplfile WHERE (tpl_tplset = 'alter' AND tpl_file = 'news_index.html') ORDER BY tpl_refid
SELECT f.*, s.tpl_source FROM xoops_tplfile f LEFT JOIN xoops_tplsource s ON s.tpl_id=f.tpl_id WHERE (tpl_tplset = 'alter' AND tpl_file = 'news_item.html') ORDER BY tpl_refid
SELECT * FROM xoops_tplfile WHERE (tpl_tplset = 'alter' AND tpl_file = 'news_item.html') ORDER BY tpl_refid
SELECT f.*, s.tpl_source FROM xoops_tplfile f LEFT JOIN xoops_tplsource s ON s.tpl_id=f.tpl_id WHERE (tpl_tplset = 'alter' AND tpl_file = 'system_notification_select.html') ORDER BY tpl_refid
SELECT * FROM xoops_tplfile WHERE (tpl_tplset = 'alter' AND tpl_file = 'system_notification_select.html') ORDER BY tpl_refid
-----------------------

6
tl
Re: Code syntax error?
  • 2004/6/29 23:00

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


The other thing to check: make sure the include file matches your theme folder

<{include file="alter/centerblock.html"}>
In this case, you have a theme called alter


7
dukehen
Re: Code syntax error?
  • 2004/6/30 0:54

  • dukehen

  • Just popping in

  • Posts: 91

  • Since: 2003/12/9


Yes, the file exists.

I should have mentioned that.

oops

8
tl
Re: Darn, stumped!
  • 2004/6/30 2:13

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Quote:

Queries
SELECT * FROM xoops_config WHERE (conf_modid = 0 AND conf_catid = 1) ORDER BY conf_order ASC
SELECT sess_data FROM xoops_session WHERE sess_id = '5b87cb33c07c10f63049b16df96ea4ce'
SELECT * FROM xoops_users WHERE uid=1
SELECT * FROM xoops_modules WHERE dirname = 'system'
SELECT * FROM xoops_modules WHERE dirname = 'system'
SELECT * FROM xoops_configcategory
SELECT * FROM xoops_group_permission WHERE (gperm_name = 'module_admin' AND gperm_modid = 1 AND (gperm_groupid = 1 OR gperm_groupid = 2))
Total: 7 queries

Blocks
Total: 0 blocks


If that were the query results for your site, then you should not be able to see anything, including centerblock. But you said only centerblock was not showing. Now you got me confused.

If the default theme works, then someting could be wrong with your theme file that prevents the callings of blocks (maybe messed up smarty variable callings).

9
dukehen
Re: Darn, stumped!
  • 2004/6/30 12:25

  • dukehen

  • Just popping in

  • Posts: 91

  • Since: 2003/12/9


Join the club!

http://www.alterboyz.com/modules/news/

login: testy / testy

10
tl
Re: Darn, stumped!
  • 2004/6/30 12:48

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


What I would do

alter_style.css - remove absolute positioning
.centerblock
{
    
position                absolute;
    
left                    250px;
    
top                        319px;
    
margin                    0px;
    
padding                    0px;
    
border                    0px;
}


theme.html
<div class="leftblock">
  <{foreach 
item=block from=$xoops_lblocks}>
   <{include 
file="alter/leftblock.html"}>
  <{/foreach}>
div>
<
div class="centerblock">
 
 <{if 
$xoops_showcblock == 1}>
  <{foreach 
item=block from=$xoops_ccblocks}>
   <{include 
file="alter/centerblock.html"}>
  <{/foreach}>
  
  
  
  <{foreach 
item=block from=$xoops_clblocks}>
   <{include 
file="alter/lcenterblock.html"}>
  <{/foreach}>
  

  
  <{foreach 
item=block from=$xoops_crblocks}>
   <{include 
file="alter/rcenterblock.html"}>
  <{/foreach}>
  

 <{/if}>
div>


Your leftblock and centerblocks are likely all aligned in the left column or your centerblock css points your contents to nowhere.

Try to use table (default theme as an example) to separate them.

Login

Who's Online

294 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 294


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits