Hello.
I'm adding some code to my site for only be shown on the main pages (calling to news module).
I did a simple 'if (pnModGetName=='News'){ .. ]
but i have problems when someone clicks on the "My Account" link (that calls to user.php). For postnuke, it is still on the News module and my code loads anyway.
How can i know when an user is checking their user account?
Doing a echo pnModGetName(); it shows "News" anyway he's on the "your account" place.
Can anyone help me, please?
Thank you.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Get name using pnModGetName of the my account part
-
**unknown user**
- Rank: Senior
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 2204
Code
-
**unknown user**
- Rank: Senior
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 2204
pnGetCurrentURI() was added in .750 .. I probably should have mentioned that .. if you're running a lesser version you might want to try variations depending on your PHP version.. getenv(SCRIPT_NAME);, getenv(PATH_INFO);, $_SERVER['SCRIPT_NAME']; ..etc.
good luck :) -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: May 13, 2005
- Posts: 12
anway Invalid, i'm running .750. You solution worked like a charm.
Thanks again
BTW, what i wanted to run in front page was a news list from a SimpleMachines forum (getting news from an specific forum) on the frontpage of my site, implemented on postnuke. Works great. Have it working on Wolfspain.net
Regards.
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
