1
krewl
Custom Function Req.
  • 2007/1/23 17:19

  • krewl

  • Just popping in

  • Posts: 39

  • Since: 2006/3/14


I am trying to add a function that is similar to the isAdmin function. But I don't know where to begin. I have looked through the kernel and include folders but none help. Here is what I am trying to do.

Similar to the isAdmin, if a user registers lets a say a "Team" (I have modified a module) to the site, that user now has to go through several links to get to his "team" page. I would like to add to the user menu (drop down) something like this:
<{if $xoops_xteamsadmin}>
menu4[6]='<a href="<{$xoops_url}>/visit.php?cid=<{$xteamscid}>&lid=<{$xteamslid}>">[T] Team</a>'
<{/if}>

This would be a direct link to the "team" page from the front page; but, where do I get to the code to call from the database and then add the correct functions to make it work?

Similarly, if someone would like to add this "Team" page to a User Favorites, would this be in the same location? Does a hack exist that allows a user to add to a favorites block?
-------------------
www.illinoisbmx.com



2
krewl
News Module, Whitespace and Includes
  • 2006/11/1 15:53

  • krewl

  • Just popping in

  • Posts: 39

  • Since: 2006/3/14


First, I have the latest News Module from xoops.org and the latest updates.

If I edit a document offline and get the table formats and past them into the News form, I get a mess of whitespace and extra break returns in the article page. I can clean it up by removing all whitespace between tags (offline), but its not practical if a user submits and is unaware.

So, I tried to remove the white space with the index page. I added a few lines:

->$story = str_replace('![\t ]*[\r\n]+[\t ]*!', '', $story);
->$story = str_replace(' ', '', $story); //This removed most table formatting
->$story = preg_replace('/\s+/','',$story); //Also removed table formatting... Don't know why

I also tried trim() and didn't help.

If there is something that I might be missing please let me know.

------------------
My preferred choice would be to allow an include, but I can't get any to show in the article.

I have tried the folling in the News form:
<?php include('path/doc.htm'); ?>
<!--#include virtual="path/doc.htm" -->

The php include's results are this:
include('path/doc.htm'); ?>

And the SSI include is blank.

Is it possible to include when adding it through the form? I have searched the forums for ways to include but they aren't relevant to including through a form...

Thanks.
-------------------
www.illinoisbmx.com



3
krewl
Re: MultiSite Hack for Xoops 2.0.13.2
  • 2006/10/28 3:36

  • krewl

  • Just popping in

  • Posts: 39

  • Since: 2006/3/14


Got it. I had to export the users table, to make sure sure tables were identical and at the final instructions added this...
Quote:
TYPE= MyISAM ENGINE=MERGE UNION=(db1.tablename) INSERT_METHOD=FIRST;


Thanks for the help.
-------------------
www.illinoisbmx.com



4
krewl
Re: MultiSite Hack for Xoops 2.0.13.2
  • 2006/10/27 15:56

  • krewl

  • Just popping in

  • Posts: 39

  • Since: 2006/3/14


Thanks. I attempted it... I have errors all are the same. Here is one:
Quote:
#1017 - Can't find file: 'xoops2_groups_users_link.MRG' (errno: 2)

Its related to parts or all of the table not being MyISAM. With the TYPE being merge for the second databse, not sure where to look. Would this be the first databse (xoops) or the second (xoops2) in my case? I tried changing the TYPE=MERGE to ENGINE=MERGE, same. Look more into it after work tonight.
-------------------
www.illinoisbmx.com



5
krewl
Re: MultiSite Hack for Xoops 2.0.13.2
  • 2006/10/27 3:28

  • krewl

  • Just popping in

  • Posts: 39

  • Since: 2006/3/14


Sent you a PM, I can't figure out the multisite or multix... The "trick" is next.
-------------------
www.illinoisbmx.com



6
krewl
Re: MultiSite Hack for Xoops 2.0.13.2
  • 2006/10/26 3:37

  • krewl

  • Just popping in

  • Posts: 39

  • Since: 2006/3/14


I tried installing the Multix module and hack... Not sure if it is what I need, seems that should be implemented when you start your site.. I already have the main site up and running, this module requires that i change the first site. I would rather just call the user table from the first sites database and then the second site can have its own modules seperate from the first. Probably not possible.
-------------------
www.illinoisbmx.com



7
krewl
Re: MultiSite Hack for Xoops 2.0.13.2
  • 2006/10/24 4:04

  • krewl

  • Just popping in

  • Posts: 39

  • Since: 2006/3/14


Looking to do same thing...

Users register once and can gain access to 2 different sites, 2 different databases, on same localhost.
-------------------
www.illinoisbmx.com



8
krewl
Re: sharing xoops' users database
  • 2006/10/24 3:05

  • krewl

  • Just popping in

  • Posts: 39

  • Since: 2006/3/14


Looking for solution as well, multi-site hack isn't the solution. I have tried to my limits, nothing...
-------------------
www.illinoisbmx.com



9
krewl
Re: Dual login with Subdomain...
  • 2006/10/17 13:26

  • krewl

  • Just popping in

  • Posts: 39

  • Since: 2006/3/14


I have the XOOPS 2.0.15 (released 2006/08/25) version... I have read many posts for Multisites, etc.

I would like to pull user information only from DB1 for login use on Site1 and Site2, with Site2 being independent but on the same localhost. Possible? That may be more clearer than my previous post.
-------------------
www.illinoisbmx.com



10
krewl
Re: Cookies in xoops 2.013.2 and multi-sites
  • 2006/10/17 12:57

  • krewl

  • Just popping in

  • Posts: 39

  • Since: 2006/3/14


Where'd you get the multi-sites hack? Couldn't find it here..
-------------------
www.illinoisbmx.com




TopTop
(1) 2 3 4 »



Login

Who's Online

221 user(s) are online (58 user(s) are browsing Support Forums)


Members: 0


Guests: 221


more...

Donat-O-Meter

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

Latest GitHub Commits