Autor | Zpráva | ||
---|---|---|---|
26lukas26 Profil |
#1 · Zasláno: 21. 9. 2013, 10:58:53
http://topodkaz.net/galerie/svedsko-to-robi-dobre a ked prepnem na dalsi obrázok je tam ten istý koment.
Neviem vyriešiť náväznosť comment boxu na url ktorá je jedinečná... poradíte mi? |
||
shaggy Profil |
#2 · Zasláno: 21. 9. 2013, 11:23:10
Stačí si pozrieť zdroják (stránky http://topodkaz.net/galerie/svedsko-to-robi-dobre) a vidíš, kde je chyba:
<div class="fb-comments" data-href="http://topodkaz.net/galerie" data-width="470"></div> |
||
26lukas26 Profil |
#3 · Zasláno: 21. 9. 2013, 11:39:38
no jasne ale na aku url to mam prepisat aby to bolo automaticke?
|
||
Fisir Profil |
#4 · Zasláno: 21. 9. 2013, 11:42:30
Reaguji na 26lukase26:
„na aku url to mam prepisat“ Na URL aktuální stránky. Zkus hledat, jestli se nedá nějak zjistit v PHP. |
||
26lukas26 Profil |
#5 · Zasláno: 21. 9. 2013, 12:08:21
Nevyznam sa... vedel by si ho najst?
<?php /** Template Name: Gallery */ global $wpdb; if(!get_query_var('pid')){ $first_slug = $wpdb->get_var("SELECT image_slug FROM wp_ngg_pictures ORDER BY pid desc LIMIT 1"); wp_redirect(home_url().'/galerie/'.$first_slug); exit; } get_header(); ?> <style type="text/css"> #content img { width: 100%; height: auto; } .thumbs { height: 55px; padding: 10px 0; } .thumb { width: 80px !important; height: auto; float: left; margin: 0 4px; } .thumb.active { border: 2px solid; } .description { width: 100%; margin: 10px 0; background: #a5cbd6; clear: both; } .description p { padding: 8px; } .arrows { line-height: 25px; } .arrows a { text-decoration: none; color: #01abdd; } .arrows>.right{ float: right; } </style> <div class="container_wrap"> <div class="container_12"> <div id="content" class="grid_8"> <?php $path = $wpdb->get_var("SELECT path FROM wp_ngg_gallery WHERE gid=1"); $current = $wpdb->get_results("SELECT * FROM wp_ngg_pictures WHERE image_slug='".get_query_var('pid')."'"); $nb = 3; $na = 3; $images_before = $wpdb->get_results("SELECT * FROM wp_ngg_pictures WHERE pid > ".$current[0]->pid." ORDER BY pid asc LIMIT ".$nb); if(count($images_before) < 3) $na += 3 - count($images_before); $images_after = $wpdb->get_results("SELECT * FROM wp_ngg_pictures WHERE pid < ".$current[0]->pid." ORDER BY pid desc LIMIT ".$na); if(count($images_after) < 3){ $nb += 3 - count($images_after); $images_before = $wpdb->get_results("SELECT * FROM wp_ngg_pictures WHERE pid > ".$current[0]->pid." ORDER BY pid asc LIMIT ".$nb); } $images_before = array_reverse($images_before); $prev = end($images_before)->image_slug; $next = $images_after[0]->image_slug; ?><center> </center><br/> <div class="img"><img src="/<?php echo $path.'/'.$current[0]->filename ?>" alt="" /></div><br/> <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fodkaz.org%2F/galerie/<?php echo $current[0]->image_slug ?>&send=false&layout=standard&width=450&show_faces=false&locale=sk_SK&font&colorscheme=light&action=like&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100%; height:35px;" allowTransparency="true"></iframe> <div class="arrows"> <span class="left"> <?php if($prev): ?> <a href="/galerie/<?php echo $prev ?>"> ◄ Predchádzajúce </a> <?php else: ?> ◄ Predchádzajúce <?php endif ?> </span> <span class="right"> <?php if($next): ?> <a href="/galerie/<?php echo $next ?>"> Nasledujúce ► </a> <?php else: ?> Nasledujúce ► <?php endif ?> </span> </div><center><div class="fb-comments" data-href="http://topodkaz.net/galerie/" data-width="470"></div> </center> <div class="description"><p><?php echo stripcslashes($current[0]->description) ?></p></div> <div class="thumbs"> <?php foreach($images_before as $image): ?> <a href="/galerie/<?php echo $image->image_slug ?>"> <img src="/<?php echo $path.'/thumbs/thumbs_'.$image->filename ?>" class="thumb" /> </a> <?php endforeach ?> <a href="/galerie/<?php echo $current[0]->image_slug ?>"> <img src="/<?php echo $path.'/thumbs/thumbs_'.$current[0]->filename ?>" class="thumb active" /> </a> <?php foreach($images_after as $image): ?> <a href="/galerie/<?php echo $image->image_slug ?>"> <img src="/<?php echo $path.'/thumbs/thumbs_'.$image->filename ?>" class="thumb" /> </a> <?php endforeach ?> </div> </div> <!-- end #content --> <?php get_sidebar(); ?> </div> </div> <?php get_footer(); ?> |
||
Fisir Profil |
#6 · Zasláno: 21. 9. 2013, 12:34:50
Reaguji na 26lukase26:
Řádek 105. data-href="http://topodkaz.net/<?php echo($_SERVER['REQUEST_URI']); ?>" |
||
26lukas26 Profil |
#7 · Zasláno: 21. 9. 2013, 12:50:36
dakujem funguje... :)
|
||
annie Profil * |
#8 · Zasláno: 22. 9. 2013, 18:22:29 · Upravil/a: Moderátor (editace znemožněna) 22. 9. 2013, 20:55:41
Dobrý den, chtěla jsem se zeptat na fb komenty. Chtěla bych napsat odkaz do komentů, ale nejde mi ho napsat tak, aby se otevřel do nového okna,když na něho kliknu.
zkoušela jsem takto: <a href="ht>tp://ww>w.seznam.cz">Seznam</a> , kde by se měl otevřít seznam, ale mě se to prostě nezobrazí, ta nevím kde dělám chybu. poradí mi někdo? Díky za odpověď
Moderátor Petr ZZZ: Příště si prosím na nesouvisející dotaz založ vlastní vlákno a nepiš do cizího (a vkládej kódy mezi značky
[>pre] a [>/pre] – stačí kliknout na ). |
||
shaggy Profil |
#9 · Zasláno: 22. 9. 2013, 19:22:43 · Upravil/a: Moderátor (editace znemožněna) 22. 9. 2013, 20:55:51
annie:
Hmm, okrem toho, že to nesúvisí s pôvodnou otázkou, tak do FB komentárov nie je možné vkladať html kód. |
||
Časová prodleva: 11 let
|
0