Need help with own theme

Development related discussion.
User avatar
Jack
Advanced Member
Posts: 668
Joined: Fri Mar 27, 2009 7:37 pm
Location: Australia

Re: Need help with own theme

Post by Jack » Sat Aug 02, 2014 11:35 pm

[quote="paulhobbel"]
 
Hello is there anybody who can help me with the folowing:

Im trying to show the users name into the navbar but the folowing code will only work if I load the usercp page, else it will not show anything but if i logout i will say "Not logged in" so that part is working.
[/quote]
 
Try "$current_user", which is available on all pages when a user is logged in. The "$user" variable is only used when on the UserCP and New/Edit User pages in the AdminCP.

User avatar
paulhobbel
Member
Posts: 28
Joined: Thu Jul 31, 2014 10:06 am
Contact:

Re: Need help with own theme

Post by paulhobbel » Mon Aug 04, 2014 9:09 am

Thank you very very very much. The AdminCP is almost done. But one last question timoline is helping me now but we cant find a way to use the modal from bootstrap for edit forms in the AdminCP
Last edited by paulhobbel on Mon Aug 04, 2014 9:10 am, edited 1 time in total.
Bootstrap Theme for Traq here | Dutch Translation for Traq here | Theme demo here

User avatar
Jack
Advanced Member
Posts: 668
Joined: Fri Mar 27, 2009 7:37 pm
Location: Australia

Re: Need help with own theme

Post by Jack » Mon Aug 04, 2014 12:46 pm

[quote="paulhobbel"]
 use the modal from bootstrap for edit forms
[/quote]
 
This is the part that is going to require a bit more work.
 
Could try taking a look at the remote-content for the Bootstrap modal, or one of the 3rd party libraries that add some extra remote-modal functionality.

User avatar
paulhobbel
Member
Posts: 28
Joined: Thu Jul 31, 2014 10:06 am
Contact:

Re: Need help with own theme

Post by paulhobbel » Tue Aug 05, 2014 8:59 am

Okay I will try to find something but do you like it already?
Bootstrap Theme for Traq here | Dutch Translation for Traq here | Theme demo here

User avatar
paulhobbel
Member
Posts: 28
Joined: Thu Jul 31, 2014 10:06 am
Contact:

Re: Need help with own theme

Post by paulhobbel » Tue Aug 05, 2014 9:27 am

Alright there is already a simple way to do this now i only need to test it and inplent it
Bootstrap Theme for Traq here | Dutch Translation for Traq here | Theme demo here

User avatar
paulhobbel
Member
Posts: 28
Joined: Thu Jul 31, 2014 10:06 am
Contact:

Re: Need help with own theme

Post by paulhobbel » Tue Aug 05, 2014 9:39 am

Alright you really need to help me because this should work:

Code: Select all

<?php echo HTML::link(l('new_user'), '/admin/users/new', array('class' => 'btn btn-primary', 'data-toggle' => 'modal', 'data-target' => '#myModal')) ; ?>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
 <h4 class="modal-title">Modal title</h4>

</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
But it does give me a view error: 
error.png
Bootstrap Theme for Traq here | Dutch Translation for Traq here | Theme demo here

User avatar
paulhobbel
Member
Posts: 28
Joined: Thu Jul 31, 2014 10:06 am
Contact:

Re: Need help with own theme

Post by paulhobbel » Tue Aug 05, 2014 10:21 am

Alright i found a way :D
edit: please come and try it out: http://bugs.thealphacrew.tk/admin/roles and login with username: demo password: demo
oh and users is working to :D
Last edited by paulhobbel on Tue Aug 05, 2014 10:44 am, edited 1 time in total.
Bootstrap Theme for Traq here | Dutch Translation for Traq here | Theme demo here

User avatar
Jack
Advanced Member
Posts: 668
Joined: Fri Mar 27, 2009 7:37 pm
Location: Australia

Re: Need help with own theme

Post by Jack » Tue Aug 05, 2014 10:48 am

Looking good.
 
If it's trying to load views as a JavaScript file you may need to add "?overlay=true" to the end of the URL. 

User avatar
paulhobbel
Member
Posts: 28
Joined: Thu Jul 31, 2014 10:06 am
Contact:

Re: Need help with own theme

Post by paulhobbel » Tue Aug 05, 2014 3:31 pm

How do you mean did i forget something because when im adding ?overlay=true then it will just give me the default page not the overlay one
Bootstrap Theme for Traq here | Dutch Translation for Traq here | Theme demo here

User avatar
Jack
Advanced Member
Posts: 668
Joined: Fri Mar 27, 2009 7:37 pm
Location: Australia

Re: Need help with own theme

Post by Jack » Tue Aug 05, 2014 11:03 pm

The way the default theme fetches overlay views is via JavaScript with the added "overlay=true", but it appears you have it all working after taking a look at the demo site you have setup.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest