foxhound |
|
||||
---|---|---|---|---|---|
Working on a new plugin, pretty simple probably but its actually the first one I ever got to work. :)
The sidepanel is created in my footer with the following code:
Yes, I am using "redirect back on login" and I made 100% sure I am not actually on the plugin page.
I am trying to make a plugin for this sitepanel: http://pupunzi.com/#mb.components/mb.extruder/extruder.htm <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Twiebie |
|
---|---|
If I correctly understand what your goal is, I don't think you need a plugin for this. Simply code it as explained in the documentation on their website. If you want to use a seperate TPL for it you could include it with: {FILE "{PHP.cfg.themes_dir}/{PHP.usr.theme}/tpl/foobar.tpl"} |
foxhound |
|
---|---|
I need this to work with xtemplate as I plan to use this as the user control panel, for his PM's, his profile and a lot more. I only want to show the content the member has access to in that panel. Thats why I figured I had to make it a plugin with its own tpl so I can use if, else statements etc ;) <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Twiebie |
|
||
---|---|---|---|
You can do that in the TPL aswell.
Have a look at: http://www.cotonti.com/docs/ext/themes/ |
foxhound |
|
---|---|
Uhm, yes. That is why I made it a tpl. It needs to be a tpl to work with the xtemplate.
The issue is with the fact this plugin causes a user to be (re)directed to "index.php?e=sidepanel" after succesfull login. And of course it should not do that. I would like to know how to prevent that. <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Twiebie |
|
---|---|
Can you show the rest of your code, because at the moment I'm a bit confused. |
foxhound |
|
||||||||
---|---|---|---|---|---|---|---|---|---|
In my first post I linked you to the source, you can use that in case you need more. I can only paste here my edits I have made but posting all js files is not needed I guess?
Than I have my sidepanel setup php file:
Than my sidepanel.php:
And I have this is my sidepanel.tpl
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Twiebie |
|
||||
---|---|---|---|---|---|
If you want to do it with a plugin you should set the hook to ajax. Call it like this:
Note the index.php?r=sidepanel |
foxhound |
|
---|---|
It is almost working right, I will get to that at the end. <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Twiebie |
|
||
---|---|---|---|
Remove:
The 'r' is so that it doesn't include header.php and footer.php. |
foxhound |
|
||
---|---|---|---|
#38222 Twiebie:
Sorry, it must be cause its late but that class is not present as far as I can tell. Not in the sidepanel tpl at least and also not in the php. I am not sure where you want me to remove it from? <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Twiebie |
|
---|---|
Try to build up your sidepanel.tpl file from scratch, I think it's in there. I've never used this Extruder thing before, so I can't be of much more assistence. |
foxhound |
|
||
---|---|---|---|
I had to comment out the following line in sidepanel.php
Now it properly works and allows me to use the conditions etc. Thanks for all the help!! <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Twiebie |
|
---|---|
Ah, sorry. Overlooked that. |
foxhound |
|
---|---|
No problem at all, you really helped me lot getting this done. <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|