1
cavergary
php in custom block
  • 2009/3/17 23:54

  • cavergary

  • Just popping in

  • Posts: 16

  • Since: 2005/3/30


I'm trying to add the following code in a custom block. I'm running XOOPS 2.3.1RC

The code works fine on an independent page.
When I add a new block with content type set to php the block doesn't even show up.
The visibility, permissions and groups are set okay. Any ideas on how to get this to work?

le="color: #000000"><?php <? $day = 27; // Day of the countdown $month = 04; // Month of the countdown $year = 2009; // Year of the countdown $hour = 12; // Hour of the day (east coast time) $event = "Conference Begins"; //event $calculation = ((mktime ($hour,0,0,$month,$day,$year) - time(void))/3600); $hours = (int)$calculation; $days = (int)($hours/24); ?> It is <?=$days?> days until <?=$event?>.


You'd think I'd have remembered what I did 2 years ago. If using the PHP content type the code must be pure php without the opening/closing tags. And no html.


Working Code
le="color: #000000"><?php $day = 27; // Day of the countdown $month = 04; // Month of the countdown $year = 2009; // Year of the countdown $hour = 12; // Hour of the day (east coast time) $event = "Conference Begins"; //event $calculation = ((mktime ($hour,0,0,$month,$day,$year) - time(void))/3600); $hours = (int)$calculation; $days = (int)($hours/24); print "It is $days days until $event.";



2
cavergary
xoopsuser.mysite.com - how to?
  • 2008/11/20 5:22

  • cavergary

  • Just popping in

  • Posts: 16

  • Since: 2005/3/30


I have a site that uses a static front end with a users area run by xoops. Now the owner wants to have a custom subdomain for each registered user. For example:
http://www.mysite.com becomes xoopsuser.mysite.com
Xoops runs in http://www.mysite.com/users

Any ideas on how to achieve this?



3
cavergary
Re: wiwi on php5
  • 2008/11/1 19:54

  • cavergary

  • Just popping in

  • Posts: 16

  • Since: 2005/3/30


Thanks for the info. I'll have to look elswhere for the problems. I have tried many different configs including the new one mentioned.

I moved the entire site to a new server and found not everything is working the same. It is very frustrating.



4
cavergary
wiwi on php5
  • 2008/11/1 19:17

  • cavergary

  • Just popping in

  • Posts: 16

  • Since: 2005/3/30


Is there any known problems running wiwimod on php5?

I recently moved servers and went from php 4.4.4 to 5.25.
Mysql version 5.0.24 to 5.0.45.

Wiwi will not function properly now. upon install the default user will not get configured and none of the editing features work. Most other modules are fine... any other ideas?



5
cavergary
Re: Wiwimod
  • 2008/11/1 19:12

  • cavergary

  • Just popping in

  • Posts: 16

  • Since: 2005/3/30


moved to higer level topic - sorry



6
cavergary
Re: 2.3 Registering issues
  • 2008/10/15 20:16

  • cavergary

  • Just popping in

  • Posts: 16

  • Since: 2005/3/30


I had the same problem. Check to see that you have GD2 libraries enabled in your php.ini file. You must have a graphics library enable to make the captcha image show up.



7
cavergary
Re: Xoops 2.3 No Admin functions
  • 2008/10/3 17:08

  • cavergary

  • Just popping in

  • Posts: 16

  • Since: 2005/3/30


I found the problem.

in the mainfile.php the path was determined wrong by the install script for xoops_data. I had to insert /caches/ to the path like so;

XOOPS_VAR_PATH, 'D:/Apache/Apache2/htdocs/xoops_data/caches/xoops_cache'

Thanks to tank1955 for the hint that lead to the fix!



8
cavergary
Xoops 2.3 No Admin functions
  • 2008/10/3 16:32

  • cavergary

  • Just popping in

  • Posts: 16

  • Since: 2005/3/30


I have a fresh new install of XOOPS 2.3.0. All seemed to go well. When I login as admin I see the following. But none of the admin links do anything! Any ideas? My app live in /htdocs/xoops and I have placed the xoops_data and xoops_lib in /htdocs, one level above the xoops_root but still in the webservers root dir. The install script found those dir's fine and said they were writeable... Help!


le="color: #000000"><?php XOOPS Version - XOOPS 2.3.0 PHP Version - 5.2.4 MySQL Version - 5.0.26-community-nt Server API Version - apache2handler OS Version - WINNT safe_mode - Off register_globals - Off magic_quotes_gpc - Off allow_url_fopen - On fsockopen - On allow_call_time_pass_reference - Off post_max_size - 8M max_input_time - 60 output_buffering - 4096 max_execution_time - 30 memory_limit - 128M file_uploads - On upload_max_filesize - 2M Loaded PHP extensions « * bcmath * calendar * com_dotnet * ctype * session * filter * ftp * hash * iconv * json * odbc * pcre * Reflection * date * libxml * standard * tokenizer * zlib * SimpleXML * dom * SPL * wddx * xml * xmlreader * xmlwriter * apache2handler * MySQL * MapScript



9
cavergary
Display Real Name
  • 2008/9/25 4:57

  • cavergary

  • Just popping in

  • Posts: 16

  • Since: 2005/3/30


I need to show the real name of users logged in. The Who's online module is great, but uses user names. Any idea on where/how to change this?



10
cavergary
Re: Add New Block - Content type php script HELP
  • 2006/10/16 19:09

  • cavergary

  • Just popping in

  • Posts: 16

  • Since: 2005/3/30


Works Great! Thanks a million!




TopTop
(1) 2 »



Login

Donat-O-Meter

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

Latest GitHub Commits