11
AAINC
Re: "Include" some php code into my theme.html
  • 2005/4/6 23:36

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


you can call in php files in your theme from your theme directory like this.
<{include_php file="$xoops_rootpath/themes/your_theme/your_file.php"}>


This only brings the php file code into the theme.
You still need to execute it inside the theme.


An example of this is Ryuji PM hack.

this is the php file inside your theme directory.
ex_assign.php

// $Id$
// FILE        ::    ex_assign.php
// AUTHOR    ::    Ryuji AMANO 
// WEB        ::    Ryu's Planning 
//

global $xoopsUser$xoopsModule;
if (
is_object($xoopsUser)) {
    
$pm_handler =& xoops_gethandler('privmessage');

    
$criteria = new CriteriaCompo(new Criteria('read_msg'0));
    
$criteria->add(new Criteria('to_userid'$xoopsUser->getVar('uid')));
    
$this->assign("ex_new_messages"$pm_handler->getCount($criteria));
}

if ( 
is_object($xoopsModule) ) {
    
$this->assign('ex_moduledir'$xoopsModule->getVar('dirname'));
}

?>


Now to call into theme.html you place this below the body tag of the theme.html.

<{include_php file="$xoops_rootpath/themes/Your_Theme/ex_assign.php"}>


Now to execute this example of code into theme.html you use something like this inside the theme.html.

<{if $ex_new_messages 1}>
<
a href="<{$xoops_url}>/viewpmsg.php">Private Messagesa>
<{/if}>
<{if 
$ex_new_messages 0}>
<{if 
$smarty.server.SCRIPT_NAME == "/index.php"}>
<
script language="javascript" type="text/javascript">

script>
<{/if}>
<
a  href="<{$xoops_url}>/viewpmsg.php">
<
span style="color:#ff6600;"><{$ex_new_messages}>-Message(s)
span>a>
<{/if}>



Now with the above code, if you have any PM's the number of PM's will show next to the static link 'Private Messages'. A popup will also happen when you enter your index page telling you number of PM's.

I hope this example of the PM hack helps you.

PEACE

::::EDITED:::::
without the whistles and bells of the popup and link, all you have to do to execute the code in the above example is place this in the theme.html:

<{$ex_new_messages}>




12
AAINC
Re: Adding Address to "Contact Us" module
  • 2005/3/24 0:30

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


Hello,
I thought i updated my files with readme's. I am very bad about that: Not including readmes in my hack-n-slash. I do apologize.

First unzip the file.
Upload the archcontact folder, and all contents of the folder to your modules directory.

You say htdocs, I guess, htdocs/modules/, is the path you need to upload to.

Then install through the admin.

I will find my updated files and upload so that there are readme and version hist. Was not there a template readme, that the QA folks made?

Peace



13
AAINC
Re: Adding Address to "Contact Us" module
  • 2005/3/23 23:53

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


Hello,
I merged the impressium and contact module to do exactly that, add additional info, like address.
You can also place html in the area.
There a demo here
http://archangelartifacts.com/modules/archcontact/

Download here

https://xoops.org/modules/repository/singlefile.php?cid=83&lid=1287
or
http://archangelartifacts.com/modules/wfdownloads/singlefile.php?cid=5&lid=9

PEACE


If you need an advanced contact module try the Liaise, great mod to make multiple forms and contact areas.

http://www.brandycoke.com/home/modules/cryptica/showfile.php?file_id=23

PEACE



14
AAINC
Re: MySQL Optimization
  • 2005/3/15 22:18

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


Here is a module for XOOPS that will optimize your MySQL db.

https://xoops.org/modules/repository/singlefile.php?cid=17&lid=1203



15
AAINC
Re: Banner module problem
  • 2005/2/27 8:49

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


This may or may not be the problem.

Make sure you are using full URL pathway.

For the click url:
http://www.yoursite.com
not
http://www.yoursite.com

Same with image url
http://www.yoursite.com/images/yourimage.gif
not
http://www.yoursite.com/images/yourimage.gif

Hope it is as simple as that.

Peace



16
AAINC
Re: Double Standards
  • 2005/2/14 2:03

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


Poor taste and joking would be a XOOPS club.

Quote:
In fact, the Creative Commons license statement shown at the foot of Xoops.org is thoroughly confusing. Why is it there?


Why is it there?

Quote:
AFAIK, the Creative Commons License forbids use of the software for commercial purposes.


Not quite true, you have the Attribution-ShareAlike 2.0
http://creativecommons.org/licenses/by-sa/2.0/

Quote:
You are free:

to copy, distribute, display, and perform the work
to make derivative works
to make commercial use of the work



I personally am not against any developer/coder/hack-slash artist, making money on their work, and have donated monies at a few XOOPS sites. I would pay/donate right now for several modules if they were available.
Why you say?
I will not have time in the near future to code myself.
anyways
Keep It Simple



17
AAINC
Re: Double Standards
  • 2005/2/13 22:34

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


[size=xx-large]XOOPSClub[/size]



Dear User:
Welcome to the XOOPS Club! This Club has been created for the serious XOOPS users that want to have some extra benefits on the community and at the same time help the future development of this great 00 Content Management System.

XOOPS is a Free Software project released under the GNU/GPL license and distributed for free. Its development cost a lot of time and money from the developers side, and we wanted to offer this new feature as a fair manner to finance the project's costs. Because I don't think that requesting donations is the best way to manage some incomes for the project, I wanted to have a method to obtain the needed money giving something in return to you.

What advantages do you get as a member?
You'll get access to an exclusive private area where you can find extra stuff for your site and to enhance your XOOPS experience. Here is a short list of stuff you'll get as a member:

· Latest XOOPS Official releases not available to the public until a new release comes out
· All XOOPS versions released in a whole year
· XOOPS Alphas, Betas and Release Candidates (which will not be public)
· Special non public released addons from the XOOPS author
· A huge collection of themes, addons, modules and blocks collected from the net
· Exclusive graphics for your site

We are working very hard to get special offers and discounts from third parties companies as an additional benefit for our members.

How much does it cost to be a member?
The cost of the service is US$ 100 for ONE YEAR membership. I need to cover also some costs for the merchant account contract and wire transfers, but I think that is a very low fee and anyone can pay for it to be a member. Remember that you'll be giving direct help for future releases of XOOPS.

Who can apply?
Anyone in the world. There is no limitation and anyone who can pay US$ 100 annualy can join the Club.

How can I join the Club?
To join the Club just click on the button bellow.
Complete the form following a few easy instructions. Please allow from 24 to 48 hours to activate your account. Please note that if you paid with eCheck there will be 4 business days delay. Your account information will be sent to your email.

NOTE: Being a member doesn't give right to you to receive technical support. XOOPS is distributed AS IS without warranty and without technical support. Any technical support email will be ignored. If what you want is just the latest XOOPS release, you can get it from here (If you are Club's member or already purchased Club's membership, you can get any XOOPS release for a whole year, you don't need to pay for each release to have it).
--------------------------------------------------------

What is XOOPS future?



18
AAINC
Re: mainfile.php writable problems
  • 2005/2/8 1:04

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


Some severs do not allow you to chmod to that low of level.(weird though you are the admin, right?)
Even though through FTP says it is 644 or 444, you still get the warning.
So when all else fails, try to bypass with PHP.

Create a file named chmod.php

Add this:
chmod('mainfile.php'0444);
?>



Save, upload to your XOOPS directory and open.

http://www.yoursite.com/chmod.php
Once you open up the file, DELETE it.

No More errors.

PEACE



19
AAINC
Re: {$xoops_imageurl} Problem
  • 2005/1/24 3:48

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


Quote:

mixmaster wrote:
I have a simple question about using {$xoops_imageurl}

The following code works with no problem:
<td width="##" height="##" style="background-image: 
url(http://www.mysite.com/xoops/themes/mytheme/image.jpg); 
background-repeat: no-repeat;"
>&nbsp;td>


But this won't work?

<td width="##" height="##" style="background-image: 
url([color=33CC33]<
{$xoops_imageurl}>image.jpg[/color]); 
background-repeat: no-repeat;"
>&nbsp;td>


How do I get this to work????




Your above code in html has an image in the td. To do that in css you would do something like this:

td#your_td { background: url(myimage.gif); background-repeat: no-repeat; background-position: left; height:100px; width:100px;}


Then call the td in your theme
<td class="your_td">


As Draven said, you cannot parse the smarty through the css.



20
AAINC
Re: {$xoops_imageurl} Problem
  • 2005/1/24 3:06

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


Here is the code from the ArchSilver theme, for the left blocks. xoops_imageurl does work in td background using html.

<{foreach item=block from=$xoops_lblocks}>
<
table border="1" bordercolor="silver" style="border-collapse: collapse" cellpadding="1" cellspacing="1" bgcolor="#000000" width="150">
<
tr>
<
td bgcolor="000000" valign="top">
<
table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#000000">
<
tr>
<
td valign="top" bgcolor="#000000" cellpadding="4" cellspacing="4">
<
table border="0" cellpadding="0" cellspacing="0" width="100%" height="23" bgcolor="#000000">
<
tr>
<
td background="<{$xoops_imageurl}>images/b1.gif" width="16" height="23">
<
td width="116" height="23" background="<{$xoops_imageurl}>images/b2.gif" class="blockTitle">&nbsp;<{$block.title}>
<
td background="<{$xoops_imageurl}>images/b3.gif" width="26" height="23">
td>
tr>
table>
<
table cellspacing="0" cellpadding="0" width="100%" height="100%">
<
tr>
<
td background="<{$xoops_imageurl}>images/f.gif" class="blockContent"><{$block.content}>
td>
tr>
<
tr>
<
td height="23" background="<{$xoops_imageurl}>images/u3.gif" width="100%">
td>
tr>
table>
td>
tr>
table>
td>
tr>
table>
<
br>
<{/foreach}>


try this

<td width="##" height="##" background="<{$xoops_imageurl}>images/image.jpg"nbsp;td>




TopTop
« 1 (2) 3 4 5 ... 10 »



Login

Who's Online

155 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 155


more...

Donat-O-Meter

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

Latest GitHub Commits