- Posts: 694
- Thank you received: 22
Kunena 7.0.4 Released
The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0
Question External Ad code conflicting with Kunena
- woonydanny
-
Topic Author
- Offline
- Elite Member
-
Less
More
17 years 1 week ago - 17 years 1 week ago #14948
by woonydanny
still wish that i can write my forum signature through a jomsocial plugin and do it from my jomsocial profile
External Ad code conflicting with Kunena was created by woonydanny
I have been given this ad code by an advertising company to place on my site. When i add it to my template index.php file i get a kunena error.
<!-- begin ad tag (tile=1) -->
<?php function microtime_float() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$ord=microtime_float(); ?>
then there is some more ad code here specific to my site
<!-- End ad tag -->
now when i do this i get an error:
What does this mean? It seems like there is a conflict with Kuinena and the php stuff in the ad code?
I am running J1.5.9, K1.08, MySql 5.0.67, PHP 5.2.6
Any ideas?
<!-- begin ad tag (tile=1) -->
<?php function microtime_float() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$ord=microtime_float(); ?>
then there is some more ad code here specific to my site
<!-- End ad tag -->
now when i do this i get an error:
Code:
Fatal error: Cannot redeclare microtime_float() in /home/mysite/public_html/components/com_kunena/lib/kunena.parser.base.php on line 68
What does this mean? It seems like there is a conflict with Kuinena and the php stuff in the ad code?
I am running J1.5.9, K1.08, MySql 5.0.67, PHP 5.2.6
Any ideas?
still wish that i can write my forum signature through a jomsocial plugin and do it from my jomsocial profile
Last edit: 17 years 1 week ago by woonydanny.
Please Log in or Create an account to join the conversation.
- grumblemarc
-
- Offline
- Elite Member
-
- Still making trouble
Less
More
- Posts: 1107
- Thank you received: 3
17 years 1 week ago #14953
by grumblemarc
We love stars on the Joomla Extension Directory .
Replied by grumblemarc on topic Re:External Ad code conflicting with Kunena
Have you checked with the person that gave you the code?
We love stars on the Joomla Extension Directory .
Please Log in or Create an account to join the conversation.
- woonydanny
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 694
- Thank you received: 22
17 years 1 week ago #15030
by woonydanny
still wish that i can write my forum signature through a jomsocial plugin and do it from my jomsocial profile
Replied by woonydanny on topic Re:External Ad code conflicting with Kunena
I emailed them back and posted here the same time. Though it gave a kunena error so i thought here would be best to ask.
still wish that i can write my forum signature through a jomsocial plugin and do it from my jomsocial profile
Please Log in or Create an account to join the conversation.
17 years 1 week ago - 17 years 1 week ago #15037
by sozzled
Blue Eagle vs. Crypsis reference guide
Read my blog and
Replied by sozzled on topic Re:External Ad code conflicting with Kunena
G'day, mate
What you could try is the following (to remove the attempted multiply-declared PHP function "microtime_float"):
What you could try is the following (to remove the attempted multiply-declared PHP function "microtime_float"):
Code:
<!-- begin ad tag (tile=1) -->
<?php function microtime_float_ad() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$ord=microtime_float_ad(); ?>
...
<!-- End ad tag -->
Blue Eagle vs. Crypsis reference guide
Read my blog and
Last edit: 17 years 1 week ago by sozzled.
Please Log in or Create an account to join the conversation.
- johnnydement
-
- Offline
- Elite Member
-
Less
More
- Posts: 934
- Thank you received: 5
17 years 1 week ago #15047
by johnnydement
Replied by johnnydement on topic Re:External Ad code conflicting with Kunena
is strange, microtime_float is a php function to get the server time in miliseconds, and you're not declaring it here, just using :huh:
May it be due to the changes made to it in PHP5?
Try with microtime(true) instead of microtime()
Chech php documentation about it: www.php.net/microtime
May it be due to the changes made to it in PHP5?
Try with microtime(true) instead of microtime()
Chech php documentation about it: www.php.net/microtime
Please Log in or Create an account to join the conversation.
17 years 1 week ago - 17 years 1 week ago #15052
by sozzled
Blue Eagle vs. Crypsis reference guide
Read my blog and
Replied by sozzled on topic Re:External Ad code conflicting with Kunena
I beg to differ, johnny. The statement
is a function declaration. I've searched: there is no intrinsic function microtime_float() in PHP (V4 or V5). There is, however the intrinsic function microtime() which obtains the Unix epoch time in milliseconds at the server.
The function microtime_float() is declared in kunena.parser.base.php at line 68. Attempting to declare the function a second time (as described in original question) will result in a runtime error.
Code:
<?php function microtime_float() { ... }
The function microtime_float() is declared in kunena.parser.base.php at line 68. Attempting to declare the function a second time (as described in original question) will result in a runtime error.
Blue Eagle vs. Crypsis reference guide
Read my blog and
Last edit: 17 years 1 week ago by sozzled.
Please Log in or Create an account to join the conversation.
Time to create page: 0.288 seconds