1
tommyZ
How do I make xoop php appear in an html page
  • 2005/1/24 21:20

  • tommyZ

  • Friend of XOOPS

  • Posts: 89

  • Since: 2005/1/4 1


Hi, I am using wf-channels and am trying to get the following code to appear correctly in the html page that I am uploading as one of the channel's main pages.

<ul>
  <{foreach 
item=download from=$block.downloads}>
    <
li><a href="<{$xoops_url}>/modules/mydownloads/singlefile.php?cid=<{$download.cid}>&lid=<{$download.id}>"><{$download.title}>a> (<{$download.date}>)li>
  <{/foreach}>
ul>


I guess something is missing from my html page because this code is just displaying as code in my browser, do I have to include anything in the header or ...?


thanks in advance!

Tommy Z

2
Antoine
Re: How do I make xoop php appear in an html page
  • 2005/1/24 21:41

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


No idea what wf-channels is, but if the code just gets displayed including the html tags then it is apparently getting sanitised as if it were textbox data.
If it is only displaying the stuff between { and } it doesn't get parsed by the Smarty engine and the template should be passed to it.

3
tommyZ
Re: How do I make xoop php appear in an html page
  • 2005/1/24 22:00

  • tommyZ

  • Friend of XOOPS

  • Posts: 89

  • Since: 2005/1/4 1


What displays is:

<{foreach item=download from=$block.downloads}> 
<{
$download.title}> (<{$download.date}>) <{/foreach}>



how do I go about passing the template on to it?

thanks a bunch!

Tommy Z

4
jegelstaff
Re: How do I make xoop php appear in an html page

That is smarty code, not php code. You could try actually inserting PHP codes, though I have done a few tests of this myself and not had luck with wf-channel and embedded PHP (I think it treats the page contents as a string that gets passed all at once to the page renderer, rather than as code that gets executed.

PHP code would look like this, not the tags to start and end the PHP block:

<ul>
  
    ==>
insert php code here<==

  
?>


The problem is that you seem to be referencing some template variables in your example code, and I'm not sure how you would expose that same info to PHP inside a page that has yet to be rendered by wf-channel.

If you didn't understand that last paragraph, then the short answer is, there may not be a way to do what you want, even if you can embed PHP code in wf-channel.

There might be another way to do what you want, through a custom block maybe or something like that.

Good luck,

--Julian

5
tommyZ
Re: How do I make xoop php appear in an html page
  • 2005/1/24 23:48

  • tommyZ

  • Friend of XOOPS

  • Posts: 89

  • Since: 2005/1/4 1


Well, it seems that configuring wf-channels to do as I want is not going to work.

the only other option that I see is to create a module

still having a hard time figuring exactly what is needed in the index.php of the module in order to dump the php in there.

let me explain what it is that I am after once again:

I have people from different projects (@work) posting news under different categories in the news module

for example:

project (main category)
--006 (sub)
--007 (sub)

to simplify things to not-so-computer-oriented people, I would like to centralize all of the project specfic news and downloads onto one page.

I know that it is possible to have the news module to display all the posts/articles submited under one topic.

modules/news/index.php?storytopic=4 <-- this will display only the articles under storytopic4 in the page (topic 4 is my sub category 006)

anyone have done anything like this? I don't mind if the module is statically set to display news from one topic only. Not looking to go too fancy here

I wish I knew more about the way XOOPS works... this can't be that hard to achieve!

again, any help is blessed

-Tommy Z

6
rowdie
Re: How do I make xoop php appear in an html page
  • 2005/2/11 20:12

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


I'm not too clear about what you want exactly, but could the multiMenu module help you? A forum search for it should find postings about where to get the latest version...

Rowd

7
JasonMR
Re: How do I make xoop php appear in an html page
  • 2005/2/11 20:35

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


I understand what you want and Mithrandir correct me if I'm wrong, but this is not possible, because XOOPS is currently lacking a Hook System (M. is working on it though).

I believe Rowds suggestion is what you need to look at, in your situation. So instead of providing your folks, with different Group-Specific-HTML-Pages, you should try out Group-Specific-Menues, or does this interfere too much with your site concept?

Login

Who's Online

179 user(s) are online (43 user(s) are browsing Support Forums)


Members: 0


Guests: 179


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