| Re: xoops code blocks and smarty |
| by chrometuna on 2005/1/9 8:47:11 Quote:
OK, thanks for the nudge in that direction. I will go examine those files and see if my little brain can wrap around them for once. What is the basic PHP code that would go queery the database? As in, is there a simple easy to understand list of such code and commands that ijits like me could understand? I *SHOULD* be able to figure this out just by looking at the blocks and templates, but my brain must be on vacation because it just isnt making sense to me. Maybe Ive been smoking too much PHP? Cheers tuna |
| Re: xoops code blocks and smarty |
| by Mithrandir on 2005/1/8 17:52:10 Quote: I need is a list of the various smarty codes that will draw out the info that I want to display Basic misconception there. Smarty code does not draw out any info at all. You will have to have some PHP code beneath it to draw the data from the database and "assign" it to Smarty, so it can be used in a Smarty template. Look at the current WF-Section blocks by looking at the files in the modules/wfsection/blocks directory as well as modules/wfsection/templates/blocks - and how they are registered in modules/wfsection/xoops_version.php |
| xoops code blocks and smarty |
| by chrometuna on 2005/1/8 15:48:18 I am hoping that someone can help me out here, or give me a good push in the right direction.... I want to either modify, or build some blocks for my site. But I am clueless here I am using wfsection (Zmagazine version) for my news content. Heres the code from the block that displays the sections articles (I think? Its hard to tell because block-naming is not consistant with whats used in the configuration or admin pages...some thing would be easier if terms where used consistantly throughout an entire module, or even all of xoops...such as "Topic" is NOT interchangable with "section"...but thats not what Im here to whine about today...) <code><{foreach item=wfs from=$block.new}> (<{$wfs.new}>) <a href="<{$xoops_url}>/modules/zmagazine/article.php?articleid=<{$wfs.id}>"><{$wfs.title}></a><br> <{/foreach}></code> So lets say I have four sections, and I want to make a block for EACH section (4 blocks) and in each block I want to display the four or five NEWEST articles from a section, with headlines (As links to the actual article) and the summeries to each of those articles. These blocks will be either right or left center blocks. So part of what I need is a list of the various smarty codes that will draw out the info that I want to display, and I need to know how to make the block display that info. I am at a loss to figure this out on my own. Cheers tuna |