Rakmányi Ernő képe

Per pillanat már nem aktuális.

0
0
smile4ever képe

Beletettem a template.php -ba így:

function acquia_slate_preprocess_page(&$vars) {
  global $language;
  drupal_add_js(drupal_get_path('theme', 'acquia_slate') . 'themes/acquia_slate/header_slider.js', 'theme');
  $vars['scripts'] = drupal_get_js();
  // Remove sidebars if disabled e.g., for Panels
  if (!$vars['show_blocks']) {
    $vars['sidebar_first'] = '';
    $vars['sidebar_last'] = '';
  }
...

Beletettem a theme.info file-ba így:
...
scripts[] = header_slider.js
...

Viszont nem történik semmi...
Az oldal forrásában benne van a header slider. Viszont nem mozgatja a script a html elemeket.
Még mindig rosszul akarom meghívni?
Az a fura, hogy a tesztoldalon a csúnya faragással ment (ahogy korábban írtam) itt meg sehogy se....
0
0
aboros képe

a .js fileban nem stimmel valami azért nem mozgat. vagy mi ez a header_slider.js? te írtad ezt? megmutatod? vagy ez csak a slider "plugin"? az magától miért mozgatna? mégegy jst kell hozzáadnod, amit te írsz és a slider pluginra épít.

0
0

-
clear: both;

aboros képe

mit szeretnél csinálni? lehet van más módja.

0
0

-
clear: both;

smile4ever képe

Nem én írtam, csak használom :)
a js:

// Header-Slider
 
$(document).ready(function() {
 
	//Speed of the slideshow
	var speed = 5000;
 
	//You have to specify width and height in #slider CSS properties
	//After that, the following script will set the width and height accordingly
	$('#mask-gallery, #gallery li').width($('#slider').width());	
	$('#gallery').width($('#slider').width() * $('#gallery li').length);
	$('#mask-gallery, #gallery li, #mask-excerpt, #excerpt li').height($('#slider').height());
 
	//Assign a timer, so it will run periodically
	var run = setInterval('newsscoller(0)', speed);	
 
	$('#gallery li:first, #excerpt li:first').addClass('selected');
 
	//Pause the slidershow with clearInterval
	$('#btn-pause').click(function () {
		clearInterval(run);
		return false;
	});
 
	//Continue the slideshow with setInterval
	$('#btn-play').click(function () {
		run = setInterval('newsscoller(0)', speed);	
		return false;
	});
 
	//Next Slide by calling the function
	$('#btn-next').click(function () {
		newsscoller(0);	
		return false;
	});	
 
	//Previous slide by passing prev=1
	$('#btn-prev').click(function () {
		newsscoller(1);	
		return false;
	});	
 
	//Mouse over, pause it, on mouse out, resume the slider show
	$('#slider').hover(
 
		function() {
			clearInterval(run);
		}, 
		function() {
			run = setInterval('newsscoller(0)', speed);	
		}
	); 	
 
});
 
 
function newsscoller(prev) {
 
	//Get the current selected item (with selected class), if none was found, get the first item
	var current_image = $('#gallery li.selected').length ? $('#gallery li.selected') : $('#gallery li:first');
	var current_excerpt = $('#excerpt li.selected').length ? $('#excerpt li.selected') : $('#excerpt li:first');
 
	//if prev is set to 1 (previous item)
	if (prev) {
 
		//Get previous sibling
		var next_image = (current_image.prev().length) ? current_image.prev() : $('#gallery li:last');
		var next_excerpt = (current_excerpt.prev().length) ? current_excerpt.prev() : $('#excerpt li:last');
 
	//if prev is set to 0 (next item)
	} else {
 
		//Get next sibling
		var next_image = (current_image.next().length) ? current_image.next() : $('#gallery li:first');
		var next_excerpt = (current_excerpt.next().length) ? current_excerpt.next() : $('#excerpt li:first');
	}
 
	//clear the selected class
	$('#excerpt li, #gallery li').removeClass('selected');
 
	//reassign the selected class to current items
	next_image.addClass('selected');
	next_excerpt.addClass('selected');
 
			//Scroll the items
 
	$('#mask-gallery').scrollTo(next_image, 800);		
	$('#mask-excerpt').scrollTo(next_excerpt, 800);			
 
}

A HTML elemek amiket kellene mozgasson:
<div id="mask-gallery">
                            <ul id="gallery">
                                <li><img src="/misc/js/h_slider/1.png" width="960" height="425" alt="" /></li>
                                <li><img src="/misc/js/h_slider/2.png" width="960" height="425" alt="" /></li>
                                <li><img src="/misc/js/h_slider/3.png" width="960" height="425" alt="" /></li>
                            </ul>
 
                        </div>

A teszten ugyan ez a szkript, ugyan ezeket az elemeket mozgatja :S
0
0
Hojtsy Gábor képe

Szerintem lehet, hogy most már erre kellene linkelni a honlapon, nem?

Gonda János képe

Nem az alap fordításban volt a hiba. Már nem tudom hol, de kijavítottam. A fehér halál a drupal.org -on is sokszor előfordult nálam. Az is igaz, hogy nagyon sok szálon futok egyszerre:D
21 óra után gyakori, hogy a fehér képernyőre azt mondja a Mozi, hogy kész és üres lapot nézegetek:)

Gonda János

aboros képe

$(document).ready(function() {

ilyen nincs. drupal modja van ennek. drupal modon csinaljad.
amugy nekem eleg kusza ez a js is...

plusz ha egy slideshow -t akarsz, akkor arra van tobb modul is ami views -al integralodik es ilyen-olyan slideshowkat lehet vele "klikk-klikk-kesz" modszerrel letrehozni. konnyeden.

0
0

-
clear: both;

fecske95 képe

AJAX használata: Nem - és sajnos nincs az url-ben semmi az
útvonal opcióban meghatározotton kívül.
a kifejezés leírását szeretném elérni ami működik is ha beírom az azonosítót a php kódban a sql lekérdezésbe csak változóba szeretném tenni és ehhez valahonnan kinyerni...

0
0
smile4ever képe

Értem...
Hát ezt kezd never ending story lenni ebben a formában :)
Viszont nagyon sok hasznosat tudtam meg....
1. itt nem lehet csak ugy bele tenni aztán kész...végül is CMS, nem csak egy oldal...
2. nem érdemes csak ugy belevágni egy ilyen fejlesztésbe

Igazából azért lett így beletéve, mert az a hely, ahová akarom rakni nem egy blokk, amit tudok változtatgatni, bele van égetve a témába...

Köszönöm mindenkinek a tanácsát.

0
0