I have custom block for the login box and it's with fixed size
when the user is loged in the block appears like big blank blue space
Is there any way to check if the user is logged in and if so, to display another custom block in the same place.
so if I have login in area 1 and rss in area 3 - I want after the login to display area 3 in the same place
please help
If the question is not clear enough I'll try to explain again :?
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
switch blocks if user is loged in/out -- help
-
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
Did you custom write the block or is it an HTML block?
--
Home Page | Find on Facebook | Follow on Twitter
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 11
not sure what you're asking here
I just added custom block in Xanthia and placed the tag it generated in the master.htm template
and in the admin panes I set the core ligin to appear in this block
the same for the second one -
- Rank: Expert
- Registered: Mar 11, 2003
- Last visit: Oct 21, 2009
- Posts: 1104
Permissions are the way to go if you want to prohibit someone from doing something or limit what they can do. Sometimes, this is not the issue. In those cases, setting up permissions and making sure you don't break any pre-existing schemes is a lot more work than you need. In this case, it seems more of a design issue and I think ShadyCat has the right idea.
I'd create a Xanthia plugin to check if the user is logged in and show the appropriate block. I dunno if this is exactly right, and I can't look it up right now, but you'll write something like
Code
if (!pnUserLoggedIn())
$output = pnBlockShow($moduleA, $blocknameA,$parametersA);
else
$output = pnBlockShow($moduleB, $blocknameB,$parametersB);
return $output;
Where $module is the module's name or "core" or blank. $blockname is the block's name (dah!). $parameters is/are the parameter(s) that must be passed to the block.
I think you have to deactivate the blocks, not delete them, or they will show up twice.
Good luck.
Slugger -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 11
10x Slugger :) are you sure this will work?
I'm nubbie to xanthia and to tostnuke too so I'll ask some stupid questions here
looks like I have to read some docs, but could you give me basic guidelines
As I understand I have to create a xanthia plugin, but have no idea how to do it, where to place it and is there need to activate it somewhere in the control panel?
is this all the code /I see it's a sample code here/ that I have to use or write some more to make a complete plugin? -
- Rank: Expert
- Registered: Mar 11, 2003
- Last visit: Oct 21, 2009
- Posts: 1104
I need to know more about your blocks. Rather than go back and forth, why don't you give me all the info and we'll see what we can do.
Look in your blocks admin panel. What does it say in the columns next to the two blocks you want to swap? What are the block id numbers for each? (To get, click edit and look at the URL in your browser. The value for bid is your block id number) Which do you want to show before/after someone logs in?
Slugger -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 11
well
the first block is the core login, bid=13
it's placed in position Area 1
the block position tag generated in xanthia theme engine is
and of cource this block doesn't show up when the user is logged in
I want to place in the blank space the second block
the second block is rss news, bid=33
it's rss display module and will be placed in area 4
still didn't make the configuration for this area, it could be anything
for now this block is in the center area
is that the info you need?
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
