Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks
Author Message
waleeid
New Member
New Member



Joined: May 31, 2020
Posts: 2

PostPosted: Sun May 31, 2020 10:05 am Reply with quote

hi all

i work on slide block to get news from database for phpnuke.

website [ Only registered users can see links on this board! Get registered or login! ]

you can see first block center
One box list become two they do not communicate with each other like one box
and javascript is Connected on other file

if some one know what is problem thanks

block code
php Code:


<?php

if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
include("includes/javascript.php");

global $prefix, $multilingual, $currentlang, $db;

if ($multilingual == 1) {
$querylang = "AND (alanguage='$currentlang' OR alanguage='')";
} else {
$querylang = "";
}



$result = $db->sql_query("SELECT sid, title, comments, img, hometext, counter FROM " . $prefix . "_stories WHERE time<=now() AND section='news' AND approved='1' $querylang ORDER BY sid DESC LIMIT 0,4");
while ($row = $db->sql_fetchrow($result)) {
$sid = intval($row['sid']);
$title = check_html($row['title'], "nohtml");
$hometext = addslashes(check_words(check_html($row['hometext'], "nohtml")));
$notes = check_html($row['notes'], "nohtml");
$counter = intval($row['counter']);



$content .="<link rel=\"stylesheet\" href=\"slider/style.css\" type=\"text/css\">";
$content .= "<div id=\"featured\" >";
$content .= "<ul class=\"ui-tabs-nav\">";
$content .= "<li class=\"ui-tabs-nav-item\" id=\"nav-fragment-$sid\"><a href=\"#\"><img src=\"$img\" width=\"50\" height=\"50\"><span>$title</span></a></li>";
$content .= "</ul>";

$content .= "<div id=\"fragment-$sid\" class=\"ui-tabs-panel\">";
$content .= "<img src=\"$notes\" width=\"200\" height=\"100\">";
$content .= "<div class=\"info\" >";
$content .= " <h2><a href=\"#\" >$title</a></h2>";
$content .= " <p>$hometext....<a href=\"#\">read more</a></p>";
$content .= " </div>";
$content .= "</div>";
$content .= "</div>";

}


?>
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1616

PostPosted: Mon Jun 01, 2020 5:26 am Reply with quote

waleeid, did you noticed that you have embedded two different jQuery versions? It should be only one library loaded, so remove one of them to avoid general issues. The css-file: "slider/style.css" is embedded twice inside the body instead only in the document's head. There is your javascript-code placed for your slider, can't find any related file?

_________________
Github: RavenNuke 
View user's profile Send private message
waleeid







PostPosted: Mon Jun 01, 2020 6:27 am Reply with quote

i just set one box

and javascript here
php Code:
include("includes/javascript.php");


Image

and one style.css

this 2 box because of database i have 2 article in website
this why is 2 box

they are some problem here
php Code:
$content .= "<div id=\"featured\" >";

but i dont know what is right change
thank you Very Happy
 
neralex







PostPosted: Mon Jun 01, 2020 9:50 am Reply with quote

There are only the jQuery+ui library. But this is not the code for running the slider. You have to place the css-code in the document's head only one time!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©