4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: uksoreeyes on June 17, 2003, 01:39:33 AM

Title: More Navigation and Clock in Admin CP
Post by: uksoreeyes on June 17, 2003, 01:39:33 AM
Ok Made a mod for the Admin CP which I spend most of my days trying to figure out what I can add to make my life that little bit easier.

I thought it would be a nice idea to have the date and time displayed. Also by moving a few links around seemed to make things more accessible.
--------------------
Open admin/index.php
Remember to back up this file before you edit it

Find:
Code: [Select]
<b><a href="<?php echo $site_sess->url(ROOT_PATH); ?>" target="_blank"><?php echo $lang['goto_homepage']; ?></a>&nbsp;&nbsp;</b>And delete it.

Now find:
Code: [Select]
<b><a href=<?php echo $site_sess->url("home.php?action=home"); ?> target=main>Control Panel Home</a></b>And delete it.

Next find:
Code: [Select]
Version: <b><?php echo SCRIPT_VERSION?></b>Replace with:
Code: [Select]
<?php echo date("l d F, Y");
echo <<<END
<span id=tick2>
</span>

<script>
<!--

/*By JavaScript Kit
http://javascriptkit.com
Credit MUST stay intact for use
*/

function show2(){
if (!document.all&&!document.getElementById)
return
thelement=document.getElementById? document.getElementById("tick2"): document.all.tick2
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="pm"
if (hours<12)
dn="am"
if (hours>12)
hours=hours-12
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
var ctime=hours+":"+minutes+""+dn
thelement.innerHTML="&nbsp;"+ctime+""
setTimeout("show2()",1000)
}
window.onload=show2
//-->
</script>
END;

?>
Please be sure that there is no spaces after END; and echo <<<END

Find:
Code: [Select]
show_nav_header($lang['nav_categories_main']);
show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");
show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");
Add above:
Code: [Select]
$root_path = $site_sess->url(ROOT_PATH);
show_nav_header($lang['nav_navigation_main']);
show_nav_option($lang['nav_navigation_admin_index'], "home.php?action=home");
show_nav_option($lang['nav_navigation_site_home'], "$root_path");
show_nav_option($lang['nav_navigation_phpmyadmin'], "PHPMYADMIN LINK");
Where it says PHPMYADMIN LINK enter the exact location to your phpMyAdmin manager.
--------------------
Open lang/<your language>/admin.php

Find:
Code: [Select]
$lang['nav_categories_main'] = "Categories";Add above:
Code: [Select]
$lang['nav_navigation_main'] = "Navigation";
$lang['nav_navigation_admin_index'] = "Admin index";
$lang['nav_navigation_site_home'] = "Site home";
$lang['nav_navigation_phpmyadmin'] = "phpMyAdmin";
--------------------

That's it. Save and close files.
Log in to your admin CP to see the changes.
Feedback about this mod would be well appreciated thanks.

Carl
Title: More Navigation and Clock in Admin CP
Post by: Chris on June 17, 2003, 03:21:56 AM
It would help greatly if you could show us a screenshot of your admin CP to get an idea of what these changes do.  That would help people determine if they wanted to invest the time installing the mod.  Just a suggestion. :wink:
Title: More Navigation and Clock in Admin CP
Post by: uksoreeyes on June 17, 2003, 04:47:59 AM
Great idea, I was going to make a preview image but time got a hold of me as usual. Here is a preview of the little changes my mod makes.

(http://www.soreeyes.myby.co.uk/scripts/admin-mod.gif)
Title: More Navigation and Clock in Admin CP
Post by: V@no on June 17, 2003, 11:18:53 AM
very nice!
Just I think u forgot mention to change:
Code: [Select]
show_nav_option($lang['nav_navigation_phpmyadmin'], "PHPMYADMIN LINK");with link to phpmyadmin? ;)
Title: More Navigation and Clock in Admin CP
Post by: bgmurphy on June 18, 2003, 03:41:49 PM
uksoreeyes -

great mod !!   :lol:  ... now if i can get my phpMyadmin link working!

question - i see in your screen shot that you have site logs and page logs ..

is this used to track your users? .. if so .. can you PM me the code? .. i would like to incorporate tracking/log features !! ..

also have you down any coding to track downloads ? ..

thanx
bruce
los angeles
Title: More Navigation and Clock in Admin CP
Post by: Chris on June 18, 2003, 03:42:46 PM
www.phpee.com

Easy to integrate!
Title: More Navigation and Clock in Admin CP
Post by: uksoreeyes on June 18, 2003, 03:52:26 PM
Quote from: bgmurphy
great mod !!   :lol:  ... now if i can get my phpMyadmin link working!
Like v@no said above, change the 'PHPMYADMIN LINK' to the link of your phpmyadmin.
Quote
question - i see in your screen shot that you have site logs and page logs ..
This is a seprate script and is in no way intergrated or part of 4images. it's actually a perl script which I'm looking to replace with a php script. That log script Chris has shown looks very good. I may use that.
Quote
also have you down any coding to track downloads ? ..
Not yet.

Carl
Title: More Navigation and Clock in Admin CP
Post by: bgmurphy on June 18, 2003, 04:25:04 PM
uksoreeyes -  :P

regarding the link to phpMyadmin ... i was just waiting for my web host to get back to me with the link reference ! - it seems 'localhost' was not correct..

i am using vividview's download log mod to track user by user - at least i can see what downloads they take .. but desire more info for tracking purposes

if you have followed some of my other posts - both he an v@no have pointed my to another program .. but unfortunately i am not php literate !! .. so i must rely on the generosity of those in this forum for help tweaking this area of concern

question - can you PM with details on how your log scripts work ??

thanx
bruce
Title: More Navigation and Clock in Admin CP
Post by: Chris on June 18, 2003, 09:12:18 PM
I know this is getting off-topic, but to setup pphlogger from www.phpee.com requires NO php knowledge.  You follow the instructions and add a single line of javascript to either header.html or footer.html and you're done.
Title: More Navigation and Clock in Admin CP
Post by: bgmurphy on June 18, 2003, 10:28:17 PM
thanx chris !!

the info is greatly appreciated ..

-bruce
Title: Re: More Navigation and Clock in Admin CP
Post by: AntiNSA2 on March 22, 2005, 02:01:43 PM
I would love to use this mod.... but it looks as though it was also corrupted.... I have a serious problem getting the ; and " and > in the right places already  8O
Is there any way someone can reload this to the forum without the errors ...

Thanks!
Robert
Title: Re: More Navigation and Clock in Admin CP
Post by: V@no on March 22, 2005, 02:32:30 PM
should work now
Title: Re: More Navigation and Clock in Admin CP
Post by: TIMT on March 23, 2005, 11:39:02 PM
I get the following error message after starting the ACP

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/httpd/vhosts/photofront.ch/httpdocs/admin/index.php on line 143


At line 143 I have the following code:
Code: [Select]
<html dir="<?php echo $lang['direction']; ?>">
What is wrong? If you need more information, let me know.

Thanks
Title: Re: More Navigation and Clock in Admin CP
Post by: Andreas1 on October 14, 2005, 11:06:21 AM
 :?:

The same Error:
 
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in xxxxxxx on line 140

Please help me.

Thanks
Title: Re: More Navigation and Clock in Admin CP
Post by: V@no on October 14, 2005, 02:44:38 PM
will it help if replace
Code: [Select]
END;?>with
Code: [Select]
END;
?>
:?:
Title: Re: More Navigation and Clock in Admin CP
Post by: Andreas1 on October 14, 2005, 02:49:40 PM
 :mrgreen: yes

Thanks V@no
Title: Re: More Navigation and Clock in Admin CP
Post by: V@no on October 14, 2005, 02:53:27 PM
hmmm...it seems that php highlighter in this forum has a bug, it ignores a new line between END; and ?> I had to put two newlines there in order it to display properly...wierd.
(original post is fixed now)
Title: Re: More Navigation and Clock in Admin CP
Post by: Bear on October 14, 2005, 10:42:38 PM
useful mod and working great thank you.  8)

just one thing when i try to login to phpmyadmin while in the 4images ACP, it wont let me login or except my pass/password.
just reverts back to the phpmyadmin login page again. :(

transfer the phpmyadmin link to my browser and i can login straight away, any one know why this is ???

Thanks again
Title: Re: More Navigation and Clock in Admin CP
Post by: V@no on October 14, 2005, 11:24:58 PM
What are the settings in your phpmyadmin? they have 3 or 4 different types of login process: through config, cookies, or other authorisation processes...
Which one is yours?
Title: Re: More Navigation and Clock in Admin CP
Post by: Bear on October 15, 2005, 12:09:04 AM
What are the settings in your phpmyadmin? they have 3 or 4 different types of login process: through config, cookies, or other authorisation processes...
Which one is yours?
i am sure its cookies
thanks for your reply
Title: Re: More Navigation and Clock in Admin CP
Post by: V@no on October 15, 2005, 04:08:35 AM
have u tryed different browsers? or have u tryed to right click on the phpmyadmin page and do refresh?
Title: Re: More Navigation and Clock in Admin CP
Post by: Bear on October 15, 2005, 05:20:26 AM
tried refreshing and still the same, tried a diffrent browser also.

its only when you try and login when phpmyadmin is inside 4images ACP, not a major problem but just trying to figure out whats different and why it does not except a pass/password when in the ACP.

cheers
   

Title: Re: More Navigation and Clock in Admin CP
Post by: V@no on October 15, 2005, 06:35:47 AM
perhaps something to do with frames...dont know
Title: Re: More Navigation and Clock in Admin CP
Post by: Bear on October 20, 2005, 11:38:04 PM
just having another look at this, can any one tell me how when i click the link for phpmyadmin make phpmyadmin page popup into a seperate page instead of loading within the ACP.

thank you
 
Title: Re: More Navigation and Clock in Admin CP
Post by: V@no on October 21, 2005, 01:25:00 AM
if its just for testing, then use right click on the link -> open in new window
Title: Re: More Navigation and Clock in Admin CP
Post by: Bear on October 21, 2005, 11:50:06 AM
its just that due to my previous problems with getting it to except password i wanted phpmtadmin to launch into a new browser when i clicked the phpmyadmin link.

thanks for your reply  :D