271
Cuidiu
Add Group Hack Request
  • 2006/5/31 18:17

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


I would like to hack the following part of the userinfo.php code to include a specific group in addition to the Admin:
if ($thisUser->getVar('user_viewemail') == 1) {
    
$email $thisUser->getVar('email''E');
} else {
       
$email "";
    if (
is_object($xoopsUser)) {
        
// All admins will be allowed to see emails, even those that are not allowed to edit users (I think it's ok like this)
        
if ($xoopsUserIsAdmin || ($xoopsUser->getVar("uid") == $thisUser->getVar("uid"))) {
            
$email $thisUser->getVar('email''E');
        }
    }
}

I don't want to create another admin group just for this.

Would someone help me add a group to this? Would I be using groupid?
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]



272
Cuidiu
Re: SmartSection seo feature
  • 2006/5/31 18:04

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Hello marcan,
Thank you for your reply. No, I do not see this on the SmartFactory site - the URLs look fine there. I will have to double check to see what I might have done wrong and let you know. Perhaps I am missing a setting - I have done this:
Quote:
I've downloaded the extras zip file, added the two lines to mainfile.php (for rewrite), adjusted the .htaccess in my XOOPS folder to include this line:
RewriteRule ^ss\.([a-z]+)\.([0-9.]+)/ modules/smartsection/seo.php?seoOp=$1&seoArg=$2
and adjusted the line in the smartsection/include/seo_functions.php file to reflect ss for the directory.

Is there anything else I need to do/add?
Thanks again, marcan!
Cuidiu
Quote:
marcan wrote:
Regarding the breadcrumb, I cannot reproduce that. Can you post an URL where we could see this live in action. Or perhaps i'm not understanding the issue correctly ? Can you see this bug on SmartFactory's Library ?
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]



273
Cuidiu
Re: SmartSection seo feature
  • 2006/5/30 15:14

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Thanks patagon. I guess then the answer is to not use the breadcrumb and menu block since they point right to the original URL. That disqualifies using mod_rewrite for me. I do see that Google and other SEs index URLs containing characters such ? and &topic_id= so I'm wondering how important mod_rewrite is. I'm sure it helps but not if one is creating duplicate pages across one's site.

We use mod_rewrite on most of our sites so it is frustrating that it is not available with XOOPS (completely, that is). I recently read in another post that the next major XOOPS version will offer search engine friendly URLs. I wonder if it will address the issue of breadcrumbs, menus and blocks containing the original URLs...?

Quote:
patagon wrote: Afaik the duplicate content issue happens with every rewrite method going around (simplified url for example). I guess you can make sure to always link to the 'corrected' url and then SE wont find the other content (my problem with this is that its hard to check if every url is ok).
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]



274
Cuidiu
SmartSection seo feature
  • 2006/5/29 22:09

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


I'm hoping someone will help me understand the URL_REWRITING feature of the SmartSection 2.1 RC 1 module. I've downloaded the extras zip file, added the two lines to mainfile.php (for rewrite), adjusted the .htaccess in my XOOPS folder to include this line:
RewriteRule ^ss\.([a-z]+)\.([0-9.]+)/ modules/smartsection/seo.php?seoOp=$1&seoArg=$2
and adjusted the line in the smartsection/include/seo_functions.php file to reflect ss for the directory.

The page /ss.item.1/ does indeed display the article (assigned to itemid=1) with the SE friendly URL but the original page still exists: modules/smartsection/item.php?itemid=1
Same for /ss.category.2/ as the original page: modules/smartsection/category.php?categoryid=2 still exists. Will that not create duplicate content in search engines?

Also, the links in the breadcrumb menu (SmartSection > CategoryName) and the categories menu block are not rewritten, and instead show the original URLs. I must be missing something. Is there another component in addition to the above I should be using? Does this require someone else's hack (i.e., SHORT_URLS) to work completely? Or should I remove the category menu block and breadcrumb feature?

This site uses XOOPS 2.2.4, PHP v 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]



275
Cuidiu
Re: Profile module - Website displayed as plain text rather than link
  • 2006/5/29 17:16

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


I am also curious about this. Is there no way to edit/hack this field to make an active link?

Quote:

jayfenster wrote:
I am running XOOPS 2.2.3, and when I pull up a user profile in the Profile section, the Website entry displays as plain text instead of as a link to the URL given.

Is there any kind of hack or code with which I can make the Profile section display the URL as a link?
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]



276
Cuidiu
Hiding User Email
  • 2006/5/29 16:40

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


I've searched but was unable to find the answer. I would like to hide the user's email from the anonymous group but allow it to be shown to all other groups. I understand the user_viewemail concept but want it to affect only the anonymous group. Is this possible with permissions somehow? If not, it looks like I could hack the profile/userprofile.php but I'm not sure how to go about it. Can anyone help?
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]



277
Cuidiu
Re: Can't edit forums! URGENT!!
  • 2006/5/23 20:37

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


I upgraded to CBB and editing forums works fine now. However, the digest feature still does not send digests to users.

Quote:
hipoonios wrote:
Same error happens for me, then editing forum in NewBB2.02. I'm planning to upgrade to CBB now, and see it it helps.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]



278
Cuidiu
Re: Event Guide
  • 2006/5/22 3:04

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Just in case someone else has this error - in my case it is host specific. One of the sites I'm using to test XOOPS on is hosted by Dreamhost and this error pops up frequently in the Event Guide and one other areas (so far). If anyone else has this problem, you might be able to solve it by doing a search on Dreamhost (or your host's forum/wiki) for the first part of the string. Here are a few:
- DH Forum search result 1
- DH Forum search result 2
- DH Forum search result 3

Fortunately, I'm using XOOPS on a site hosted by a different company. I installed a test site there today and it works just fine - none of these errors. I assume from the posts above it has to do with how the form and/or code is accessing the php binary directly or something to that effect. So if you have this problem, maybe those posts will help.

Edited to add: Actually it is due to running PHP as PHP-CGI as explained HERE.
So it could be the reason why I had some mod_rewrite issues as well.
Quote:
nobu wrote:
[quote]Cuidiu wrote:
Warning: Unexpected character in input: '' (ASCII=15) state=1 in /usr/cgi-system/php.cgi on line 1240
Parse error: syntax error, unexpected T_STRING in /usr/cgi-system/php.cgi on line 1240



This one is curious error. Where come from "/usr/cgi-system/php.cgi"? It not include eguide and XOOPS core.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]



279
Cuidiu
Re: SOLVED Re: Event Guide Module - How To Hack
  • 2006/5/21 22:56

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Thank you, nobu. It works fine now with no hack needed.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]



280
Cuidiu
Re: SOLVED Re: Event Guide Module - How To Hack
  • 2006/5/21 7:47

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Hi nobu,
I understand what you are saying but as I explained in my post on your forum, this feature is not working for me. I have tested countless times and posted what preferences I have enabled. It simply will not send a copy of the confirmation to the admin. All the other copies go out fine for cancellations, notifications of events but not for reservation confirmation. Otherwise, I would not have manually edited the code.

Quote:

nobu wrote:
There is following code in "reserv.php".

$xoopsMailer->setToGroups($notify_group);

That mean of send email to "Admin Group for Notification" for copy of reservation. Usualy, only add user to the group that user email address $email2.

By the way, I am not recommand register meny user in the group, because many copy of email to send makes delay time when reservation. (xoopsMailer not efective for copy sending)
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]




TopTop
« 1 ... 25 26 27 (28) 29 30 31 ... 35 »



Login

Who's Online

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


Members: 0


Guests: 149


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