X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Users online module (https://forum.x-cart.com/showthread.php?t=35096)

SystemSkins 11-01-2007 04:56 AM

Users online module
 
The module that you turn on that tells you the users online at the bottom. Can I change that somehow so that I am the only one that can see it? and unregistered and registered users can't see it? Just me as an admin

Thanks
Doug

carpeperdiem 11-01-2007 05:41 AM

Re: Users online module
 
Doug,

1. Use webmaster mode.
2. Discover that users online is an include that lives in /skin1/rectangle_bottom.tpl (however, I prefer to move it to head_admin.tpl)
3. Get creative with an if/else (usertype) -- unless you move it to head_admin.tpl

Smarty is your friend. :-)

SystemSkins 11-01-2007 11:18 AM

Re: Users online module
 
Quote:

Originally Posted by carpeperdiem
Doug,

1. Use webmaster mode.
2. Discover that users online is an include that lives in /skin1/rectangle_bottom.tpl (however, I prefer to move it to head_admin.tpl)
3. Get creative with an if/else (usertype) -- unless you move it to head_admin.tpl

Smarty is your friend. :-)


LOL yeah thats my problem... I think I need to give smarty a few drinks before she lightens up to me.

carpeperdiem 11-01-2007 11:30 AM

Re: Users online module
 
Doug,

Breaking it down to its core:

{if $usertype eq "A"} (easy enough)
{include file="modules/Users_online/menu_users_online.tpl"}
{/if}

got it?

Where you can have some fun -- MOVE the include from its default location in /skin1/rectangle_bottom.tpl - where you'll need the {if $usertype eq "A"} to filter out the customers -- TO head_admin.tpl -- which will only be visible to admins (you will or you have locked down your /admin direcrtory at your server, yes?

Here's where I put it (in head_admin.tpl)
Code:

<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="650">
{include file="modules/Users_online/menu_users_online.tpl"}
</td>
{if $login ne ""}
<td align="right">{include file="authbox_top.tpl"}</td>
<td width="10"><img src="{$ImagesDir}/spacer.gif" width="10" height="1" alt="" />
</td>
{/if}
</tr>
</table>


SystemSkins 11-01-2007 12:15 PM

Re: Users online module
 
Ok, I gave smarty a few shots and she's starting to loosen up a bit but I don't think she's ready to go home with me just yet :P

I got the users_online to show up only when i'm logged in as Admin. I moved it up to the top as well. Only problem is that it removed my width="970px" and align="center" from the whole page.

I tired to add the formatting to head_admin but it only changed the top and not the whole page.

I have width="970px" and align="center" in my rectangle_top.tpl and by adding the users_online to the admin_head.tpl it must interfere with my rectabgle_top.tpl

Doug


And as far as the locking down of the admin dir on my server. I haven't done anything to it. Since I got my cart, all I have done is copy the files to the server, change permissions on a few files, installed the cart, then changed permissions of a few files that the instructions told me to do. Is there more to do that wasn't in the instructions? If so, please tell me. I just spent (2) days entering in 375+ products and would hate for someone to erase em all/tamper with them. Yes I did back up my database every 50 products or so.

carpeperdiem 11-01-2007 12:20 PM

Re: Users online module
 
Doug,

You can't use my code verbatim. Take the guts of it as needed.

ALWAYS work on a backup.

SystemSkins 11-01-2007 12:31 PM

Re: Users online module
 
I didn't....

I took what I needed out and placed it in.

But I figured it out. last time I changed my rectangle_top I used the "edit templates" in the cart and not my dreamweaver. Therefore my dreamweaver file wasnt changed and I accidently overwrote my width and centering. I fixed it and now all is good. WOOT !!!

I just need to remember to not use the edit templates feature so I don't do this again. Plus I'll be able to keep the saved/current version of my formatting on my computer as a hard copy.

Thanks carpeperdiem


All times are GMT -8. The time now is 06:37 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.