21
Matt_T_hat
Re: PHP code broken by xoops!?
  • 2004/11/9 13:51

  • Matt_T_hat

  • Just popping in

  • Posts: 41

  • Since: 2004/11/9


when I was experimenting with the system I found that a single require statement I had written only worked without the tags.



22
Matt_T_hat
PHP code broken by xoops!?
  • 2004/11/9 12:39

  • Matt_T_hat

  • Just popping in

  • Posts: 41

  • Since: 2004/11/9


I have a code snipit from another aplication I run.

It worked perfectkly prior to install XOOPS as all iot realy does is grab some numbers

<? include("./dweb_club/config.php");
$query="SELECT * FROM $table WHERE apr='y'";
$result=mysql_query($query);
$num=mysql_numrows($result);
?> <p>We have a total of <b><?=$num?></b> members!
<? 
$query2
="SELECT * FROM $table WHERE apr!='y'";
$result2=mysql_query($query2);
$num2=mysql_numrows($result2);
?> <br />(<b><?=$num2?></b> pending <? if ($num2 == "1"){ ?>member<? } else { ?>members<? ?>)</p>

<?
$query
="SELECT * FROM $table_u";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while (
$i $num) {
$last=mysql_result($result,$i,"date");
?>
<p><small>Member listing last updated on <?=$last?>.</small></p>
<? ++$i; } ?>


I removed all the <? tags and converted all the remaining HTMl to Echo statements (not so dis-similar to the ASP I learned at college).

Now it sits there like a lemon and does nothing.



23
Matt_T_hat
Re: Sections
  • 2004/11/9 12:24

  • Matt_T_hat

  • Just popping in

  • Posts: 41

  • Since: 2004/11/9


Ideally at a minimum I'd like to be able to specify a wight so that the content doesn't appear under the huge number of custom blocks that appear below everything else on all other pages.

A bonus would be to be able to run PHP code snippits. Even better if they worked.



24
Matt_T_hat
Sections
  • 2004/11/9 9:49

  • Matt_T_hat

  • Just popping in

  • Posts: 41

  • Since: 2004/11/9


There seems to be no way of setting the wieght for sections therefore they allways appear at the bottom of the page.

Is there any way this can be given _some_ flexibility? or is there another module taht I could use that might even allow PHP code?



25
Matt_T_hat
Custom Pages
  • 2004/11/9 9:40

  • Matt_T_hat

  • Just popping in

  • Posts: 41

  • Since: 2004/11/9


Before useing XOOPS I had some very basic code running that allowed me to simply add new pages taht would be included witht he index.php with this code:

<?  
//The result that should be run in the main <Div> 
if(!$_GET['page'] || !file_exists('./cont/'.$_GET['page'].'.php')) { 
  include(
'./cont/default.php'); 
} else { 
  include(
'./cont/'.$_GET['page'].'.php'); 

?>


(I had another that read in the contents and made the hyperlinks)

The point is that my menu remained unchanged along with the footer and other eliments but the body content changed.

Is there any way that I can generate additional page(s) with out spoffing modules...

I used to do it so that each page would be:
index.php?page=PAGENAME

I think you understand what I want to do but I want to be able to use php, html or whatever like in the custom blocks.




TopTop
« 1 2 (3)



Login

Who's Online

249 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 249


more...

Donat-O-Meter

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

Latest GitHub Commits