Jump to content
php.lv forumi

Pamainit vertibu uz klikshka


Sephy

Recommended Posts

Jap .. tad gad lapa nonāk browserī, php par t vairs nav atbildīgs.

Jebkurā gadījumā jautājums nav īstajā kategorijā.

 

Ja tu gribi nomainīt īslaicīgi tikai kaut kādu teksta fragmentu,

tad to var izdarīt ar primitīvu javascript. Nāksies iemācīties to ..

 

Jebkas vairāk būs tev par sarežģītu.

Link to comment
Share on other sites

Nu labi. Man lapa ir teiksim 5 linki.

 

       	<a class="leftstyle"  href="#">Bildes</a>
       	<a class="leftstyle"  href="#">Mezhabildes</a>
       	<a class="leftstyle" href="#">Manasbildes</a>
       	<a class="leftstyle"  href="#"> Exrtabildes</a>

 

teiksim man lapas sakuma ir ievotata vertiba

$galerijaslinks='Galerijas/Bildes/';

bet ja uzspiež uz kāda cita linka(teiksim Mezhabildes) es gribu lai $galerijaslinks vertiba butu 'Galerijas/Mezhabildes/'

Edited by Sephy
Link to comment
Share on other sites

Skaidrs. Un, cik saprotu, uz tā linka uzklikojot, cita lapa (standarta veidā) netiek atvērta, jo 'href' atribūts linkam ir '#'.

 

Tās bildes tiek ielādētas (jeb kā parādītas) ar JavaScript?

Link to comment
Share on other sites

Nē, ar php, man javascripts nav tuvs sirdij :D

 

Tikai bilzhu efekti(ka karuselis ir ar javascript taisits)

 

Kapec man ta? Man pie bildem ir dazhadi info lauki pievienoti un ar javascript to visu salikt kopa bija shausmas un es paliku pie php, kur gan bildes gan info var skaisti paradit.

 

p.s. iedoshu savu galerijas skriptu ja nu vel kadam interese ar php taisita galerija

 

<?php
include("connectmysql.php");
$com_query = mysql_query("select count(*) from $tabula");
$com_row = mysql_fetch_row($com_query);
$total_results = "".$com_row[0]."";// kopejais ierakstu skaits
$total_pages = ceil($total_results);
if(!isset($_GET['bildetagad'])){//Parbauda paslaikejo lapu
$i = 1;
} else {
$i = $_GET['bildetagad'];
}
$bildesadrese = mysql_query("SELECT * FROM $tabula WHERE newid='$i'");
$row = mysql_fetch_array($bildesadrese);
echo "<a href=\"".$_SERVER['PHP_SELF']."?bildetagad=$i\"><img src=".$tips.$row['bildesadrese']."></a>";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<div id='bilzhuvieta'>";
if($total_pages>5){echo "<ul id='mycarousel' class='jcarousel-skin-tango'>";}
for ($cikls=1; $cikls<$total_pages+1; $cikls++) {
$bildesadresemaza = mysql_query("SELECT * FROM $tabula WHERE newid='$cikls'");
$rowz = mysql_fetch_array($bildesadresemaza);
if($total_pages>5){echo "<li>";}
echo "<a  href=\"".$_SERVER['PHP_SELF']."?bildetagad=$cikls\"><img class='megusta' src=".$tips.$rowz['bildeskategorija']."></a>";
if($total_pages>5){echo "</li>";}
};
if($total_pages>5){echo "</ul>";}
echo "</div>";
?>

Edited by Sephy
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...