1 bobzarzal Feb 06, 2009 07:57
3 bobzarzal Feb 06, 2009 08:16
i running 1.10.2
4 afwas Feb 06, 2009 08:27
I thought so ;)
I don't maintain a 1.10 setup, so I won't help you with this one.
Easiest is to add a link with jQuery. You remember the name of the div where the text is and do
<script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
// Load jQuery
google.load("jquery", "1");
jQuery('<a href="http://forums.b2evolution.net">Forums</a>').insertAfter(".yourDiv");
</script>
and add it to /skins_adm/_html_header.inc.php between <head> and </head>. I didn't test the code and I'm pretty sure you want to tweak it.
Good luck
*EDIT* correct jQ syntax
5 bobzarzal Feb 06, 2009 08:43
i don't have a file '_html_header.inc.php' the only php file in the skins adm folder is _adminUI_general.class.php'
inside this file i found:
/**
* Display doctype + <head>...</head> section
*/
function disp_html_head()
{
global $view_path;
require $view_path.'_menutop.php';
should i paste it in there?
6 afwas Feb 06, 2009 08:53
See if you can find a file called _menutop.php and see if that has the headers.
*EDIT*
/inc/VIEW/_menutop.php
The correct syntax is
jQuery('<a href="http://forums.b2evolution.net">Forums</a>').insertAfter(".yourDiv");
7 bobzarzal Feb 06, 2009 09:04
found the file and pasted the code in the <head> but nothing happened...
8 afwas Feb 06, 2009 09:06
Pls reread, I edited the code.
You can PM me URL plus login/password and I'll have a closer look. Really I'm not going to set up an 1.10 install just for your question.
9 bobzarzal Feb 06, 2009 09:11
sorry, i'm still new to this all... you said before "You remember the name of the div where the text is" what is the "div"?
10 afwas Feb 06, 2009 09:18
View the page source of the page. You will find the text "New post in blog" plus the three buttons. These are wrapped in a div. Foe example:
<div id="buttons"><p>New post in blog ...
In a line that's bound to be very different from this example you are looking for an id. Remember that.
In the code replace '.yourDiv' by '#buttons" or whatever name the id has. The . would denote a class, the # an id.
11 afwas Feb 06, 2009 09:29
I found a 1.10 blog. Thanks ¥åßßå.
In the code replace '.yourDiv' with '#TitleArea h1'
If it has loaded the jQuery library properly I think this will work.
The line is now:
jQuery('<a href="http://forums.b2evolution.net">Forums</a>').insertAfter("#TitleArea h1");
If it *does* appear but it appears on all pages, try:
if( document.location.indexOf( "ctrl=edit" ) != -1 ) jQuery('<a href="http://forums.b2evolution.net">Forums</a>').insertAfter("#TitleArea h1");
Good luck
12 bobzarzal Feb 06, 2009 19:11
very very close to getting this. i really appreciate all the help! so the link is showing up (on every page, which is fine) but it's not showing up exactly where i wanted it to go... and it's displaying some of the code... which leads me to believe the jquery is not working? here are some screen grabs:
http://shitledger.com/screengrab2.jpg
http://shitledger.com/screengrab3.jpg
the second is just a grab of the page source... looks like the div is right...
same results when i put in the second version of the code you wrote... and when i put in the <script> tag from your first post, it goes away all together...
13 bobzarzal Apr 24, 2009 01:09
I recently upgraded from 1.10.2 to 2.4.6 and lost the link at the tops of every page in the back office. i have tried adding this code
jQuery('<a href="http://forums.b2evolution.net">Forums</a>').insertAfter("#TitleArea h1");
to _html_header.inc.php but it still doesn't show up... any ideas?
14 bobzarzal Apr 24, 2009 01:14
update, i can see that the link is there, but it is hidden by the dashboard! also, it looks like the jQuery tag is showing...
15 afwas Apr 24, 2009 03:12
I've got some new hack for you. Open /skins/_toolbar.inc.php and add the new line on 201:
echo '</li>';
}
}
?>
<li><a href="http://forums.b2evolution.net" target="_blank">Forum</a></li> <!-- Add this line -->
</ul>
</div>
</div>
<script type="text/javascript">
function evo_menu_show( elt )
In this snippet I show you some of the surroundings.
The toolbar now has a link to your forum like this:
http://www.blog.hemminga.net/B2evoforum/ForumLink.png
Have fun
16 bobzarzal Apr 25, 2009 02:00
thanks for the new hack! it works great, and makes sense too!
17 afwas Apr 26, 2009 15:10
B)
Hi bobzarzal,
I can't fimd the location you are referring to. What version of b1evolution are you using? Can you provide a (small) screenshot?
The link itself should be easy.
Good luck