autoTooltip and autoLinktip

Started by Kender, March 23, 2008, 09:43:30 PM

Previous topic - Next topic

ameo

please don't kill me for asking, but, what code?
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

Kender

ok

open tooltips.mod  (in the zip file you downloaded)

line 41 - 48 between the words <add before> and </add before>
this bit of information should be added to your index.template.php file between the <head> and </head>

there is 1 line that says,
<link rel="stylesheet"...

and 6 lines that say, 
<script language="JavaScript"...

add all of those lines above the line where it says   </head>
(make sure its in the html of the page - not in the php part)
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Garry

#22
Hey Kender

I installed your mod and like the other guys I had a clean install but it doesnt work

I read all the postings

and I went and looked in the subs.php file but I am afraid I am lost

could you possible help me on this


Kender

was there any errors in the install

are you using custom themes
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

robbie93

gothic_rose 1.1.4

installed fine but doesnt work  :(  where can i add the text?

im confused now lol

Kender

open tooltips.mod  (in the zip file you downloaded)

line 41 - 48 between the words <add before> and </add before>
this bit of information should be added to your index.template.php file between the <head> and </head> (in your theme directory)

there is 1 line that says,
<link rel="stylesheet"...

and 6 lines that say, 
<script language="JavaScript"...

add all of those lines above the line where it says   </head>
(make sure its in the html of the page - not in the php part)
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

ameo

unfortunatelly, I got parse error after adding.
could you tell us number of line where we could put it.

also, I believe you should have this explanation in the first post of this topic,
people usually add it, because most of users have various themes, and not the default one.
thank u.
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

Garry

#27
Quote from: Kender on April 07, 2008, 09:54:26 PM
was there any errors in the install

are you using custom themes

Yes Im using several themes

Quote from: robbie93unfortunatelly, I got parse error after adding.
could you tell us number of line where we could put it.



also, I believe you should have this explanation in the first post of this topic,
people usually add it, because most of users have various themes, and not the default one.
thank u.



I also got the parse error

I have included the index template file so yo can see where I put it and maybe direct me as to what is wrong

I put it in line 138-146

Quote<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/autoTooltips.css" />

this is the line it craped out on


Kender

@Garry : Attached is the modified file, I only needed to add an ECHO statement, earlier in the thread i pointed out to make sure it was in the html of the page, not in the php, so thats what I had to fix, this should work for you now
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Kender

@ameo & @robbie93 :

If you would like to attach your index.template.php for your theme files i can see where the problem is
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Garry

Quote from: Kender on April 08, 2008, 07:37:06 AM
@Garry : Attached is the modified file, I only needed to add an ECHO statement, earlier in the thread i pointed out to make sure it was in the html of the page, not in the php, so thats what I had to fix, this should work for you now


I see what you did but still no go

now this is a custom theme I am working on

I had to put all the JS files in and css in the correct spots based on the xml file I read

should I be working on the default theme at first to get this working  ( i dont see where anything was installed for it also )

Kender

first, what is the error message

second, when you installed was there any errors with the installer
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Garry

Quote from: Kender on April 08, 2008, 08:13:49 AM
first, what is the error message

second, when you installed was there any errors with the installer


There is no error message

and there were no errors with the installer


and I copied your demo stuff to try it out



[tooltip=I have a Simple Machines Forum myself, you should get one too]SMF Forum[/tooltip] (comma is ok here)

[linktip=http://simplemachines.org/community,Simple Machines; the best friggin forum in the world!]Simple Machines[/linktip] (comma seperates url from text in bubble, so no comma in the actual text)

Linebreaks will keep formatting for the bubble, so for multi line text:
[tooltip=I have a Simple Machines Forum myself,

you should get one too]SMF Forum[/tooltip] -- this will put 2 line breaks in the bubble



and this is how it looks on my forum




Kender

okay, please attach your Subs.php file, ill look to see if the mod applied correctly
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Garry


Kender

here you go, please also make sure that your index.template has the 6 javascript lines and the CSS line as well,

lso make sure the javascript (Themes/default/autoTooltipsJS/) folder (plus 6 files) is in your DEFAULT theme folder along with the
css (Themes/default/autoTooltips.css) file and
images (Themes/default/images/autoTooltipsBL.gif  &  Themes/default/images/autoTooltipsTL.gif)
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Garry

#36
Good morning

Bingo






attached is my index.php

I dont see the code in there , I will enter it in ( somewhere ) and see if it works

I added it right at the end
for the subs.php

Quotearray(
                'tag' => 'tooltip',
                'type' => 'unparsed_equals',
                'before' => '<span class="autoTooltip" title="$1">',
                'after' => '</span>',
                'quoted' => 'optional',
                'disabled_after' => ' ($1)',
            ),
            array(
                'tag' => 'linktip',
                'type' => 'unparsed_commas',
                'before' => '<a href="$1" title="$2" class="autoTooltip" target="_blank">',
                'after' => '</a>',
                'quoted' => 'optional',
                'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
                'disabled_after' => ' ($1)',
            ),

I assume this is what you added in
for the index.template.php

Quoteecho '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/autoTooltips.css" />

<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/autoTooltipsJS/yahoo.js"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/autoTooltipsJS/dom.js"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/autoTooltipsJS/event.js"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/autoTooltipsJS/container.js"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/autoTooltipsJS/utilities.js"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/autoTooltipsJS/autoTooltips.js"></script>';


I assume this is what was added in
I am going to want this working in other themes as well so I am just trying to figure out what I need
I want to thank you for your time as this has been a very enjoyable learning experence .

Kender

its the  "index.template.php" file from your theme, and yes, those lines are what was added, the only other change is subs.php, and it needs to be in with the other bbc code tags
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

darkelhaym

I'm having a problem with this mod. When I try to use both the tooltip or linktip all it shows is an unstyled box.

[nofollow]

Line breaks don't work, too, all it does is showing the BR tag.

[nofollow]

I've installed it correctly (though I had to do a manual edit for Subs.php since it failed in the package manager) and then I did all the manual edit for my custom theme (put all the necessary files in my theme directory and edited index.template). The cursors are showing as they should, BTW (I mention it because it can't be seen in the screenshots). Another thing I noticed is that if I try to uninstall and reinstall the mod, the box works for a while then it gives the problem again.

My custom theme is Phobos and SMF version is 1.1.4. It's pretty heavily modded too, I don't know if this might be the problem. Thanks for any help.

Kender

it will work for a while, and then stop working ?
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Advertisement: