111
gstarrett
Re: "Best" place to put custom theme functions?
  • 2003/7/20 23:45

  • gstarrett

  • Friend of XOOPS

  • Posts: 174

  • Since: 2002/3/12


Quote:
chapi wrote:
As XOOPS uses smarty you should also be able to include some php files with it. Look at the following site for more information on this topic ...

http://smarty.php.net/manual/en/language.function.include.php.php


Follow-up:

The include_php function requires an absolute path to the PHP file. That's a bit cumbersome when you're dealing with win32 dev and RH8 prod. I couldn't seem to find any way to get the template's directory pre-pended to the include file (XOOPS vars unavailable, smarty vars not set??)

However, the {php} directive does work as advertised and allows me to accomplish what I wanted. The downside is I need to include the PHP code in my template--less than ideal.

I suppose it's possible the XOOPS vars are available within the smarty PHP block but I didn't check that.

Here's how I included the PHP code in my template, in case anyone wants to try it with theirs.

...
<{
php}>
// Include theme-specific functions
function dt_AZtime() {
    
# Calculate current AZ time -- Server is not in MST time zone
    # offset to server = -7h - (server offset)
    
$MST_to_Server_offset = -60 60 date"Z" );
    return 
time() + $MST_to_Server_offset;
}
    
    
$this->assign('theme_localtime'date"g:ia,  F j, Y"dt_AZtime()));
<{/
php}>

  <
table cellspacing="0">
...
      <
td id="headerbar"><a href="<{$xoops_url}>/">GAPT</a>: <{$xoops_pagetitle}></td>
      <
td id="headerbar-right"><{$theme_localtime}></td>
...


P.S. Many thanks to Chapi to pointing me to the Smarty site and getting me headed in the right direction.



112
gstarrett
Re: "Best" place to put custom theme functions?
  • 2003/7/20 21:41

  • gstarrett

  • Friend of XOOPS

  • Posts: 174

  • Since: 2002/3/12


Thanks!! That's exactly what I was hoping to find.





113
gstarrett
Re: "Best" place to put custom theme functions?
  • 2003/7/20 18:29

  • gstarrett

  • Friend of XOOPS

  • Posts: 174

  • Since: 2002/3/12


Anyone have any ideas? I'm hoping someone can provide some guidance, or perhaps tell me I'm heading down a track that "isn't done because...".

Anyone?

Thanks!



114
gstarrett
"Best" place to put custom theme functions?
  • 2003/7/19 7:28

  • gstarrett

  • Friend of XOOPS

  • Posts: 174

  • Since: 2002/3/12


Where is the recommended place to put theme-related functions in a XOOPS theme? Is there a themedir/function.php that would be included to handle defines of theme-specific functions?

Specifically, I am converting my current site into a XOOPS2 smarty theme. I'm making good progress, but I have the theater's time in the headerbar area (just below where the banner typically goes if you look at the link). I'm not sure where to put that.

Also, there are likely some other things that, if I do a straight transition, would need custom functions like the user agent info and the navigation section (top left--it's extremely basic on the site now but with more advanced navigation I could see more levels of path appearing).

Thoughts? I'm hoping I don't need to hack XOOPS core because I'm trying to keep my hacks seperate from my theme.

Thanks!



115
gstarrett
Re: MassMail to members [not-quite fixed]
  • 2003/6/22 0:25

  • gstarrett

  • Friend of XOOPS

  • Posts: 174

  • Since: 2002/3/12


I'm just guessing here, but it may be specific to our respective systems. What are you running? Mine is showing symptoms like -- but not exactly like yours.



116
gstarrett
Re: MassMail to members [not-quite fixed]

Quote:

mvandam wrote:
Please make sure to get the latest files in modules/system/admin/mailusers/ from CVS on sourceforge.

Just a sanity check here--I don't see any mail files that have changed since XOOPS 2.0 came out. Did you mean another directory? ...If you have some uncommitted changes, please let me know!

Regardless, I updated my source from CVS and am having the same problem still. I'll let you know what I find. So far:

--It seems the mail method doesn't affect the problem (PHP mail() vs. sendmail vs. SMTP).

--I try to send to a group with just 2 users. 1 gets it (who also happens to be the sender), the other does not. Both recievers are real accounts in the same domain (which is my isp, they are both my accounts).

--It still spews junk into my browser window when it dies. I haven't tried restarting my browser in between attempts--but I will next--just in case.

Regards,

Glen Starrett



117
gstarrett
Re: MassMail to members [fixed]

Quote:
Actually I've always had this problem, even under 1.35 . I think it's an issue with an artificial "limit" being placed on the number of users being sent to. So maybe it simply refuses to send to more than say 70 people? Or it's a memory problem.

Now I'm definately thinking that my problem is likely different (but maybe not!).

When I try to email multiple, even with PHP debugging on, I get scrambled characters on /modules/system/admin.php?fct=mailusers (this may be new from my original post, I have CVS copies of the files loaded).

I'll look into this more to determine where my site when I get some time (hopefully within a few days)



118
gstarrett
Re: MassMail to members [fixed]

Quote:

blueangel wrote:
so I think that there are more problems related to the Mail User function..

I'm seeing (I believe) the same thing. Try to email a group, but my page says "email send" even though it has not! I recall in the previous version the email addresses that got the note were listed on that page, but that may have changed since the older version.

Any thoughts? I would assume this is a fairly common thing to use.

Other notes worth of mention are that I'm using Register_Globals OFF with PHP 4.2.2, Apache 2.0.40, RedHat 8.0.



119
gstarrett
Re: image manager category gone ?
  • 2003/5/15 5:16

  • gstarrett

  • Friend of XOOPS

  • Posts: 174

  • Since: 2002/3/12


Just reading through this thread, it's hard to follow what you're doing and seeing happen. Try putting this into a set of simple steps and observations so that someone else can do the same thing and we might be able to help better. That is, something like:

1) My system is PHP4.x with register_globals off. On the News page, I clicked Comments.
2) Clicked Post Comment
3) See the post comment form appear
4) Enter informtion XYZ into fields 123.
5) Click Post and see that the page returns an error
6) Observe on the news page that the new post doesn't show up.

Something along those lines would be helpful, if you can create it.



120
gstarrett
Re: XoopsGallery comments error
  • 2003/5/14 21:48

  • gstarrett

  • Friend of XOOPS

  • Posts: 174

  • Since: 2002/3/12


I have created a patch that fixes the problem. I'll have to post the patch to bugzilla since I can't seem to attach anything here (the patch is plain text, but a bit lengthy for a post).

Here is the bug report with the patch attached.

Thanks!




TopTop
« 1 ... 9 10 11 (12) 13 »



Login

Who's Online

92 user(s) are online (55 user(s) are browsing Support Forums)


Members: 0


Guests: 92


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