drgyz képe

a következő módon védtem ki a dupla megjelenést:
a \modules\forum\forum-topic-list.tpl.php fileban lévő kódot:

  1. <?php foreach ($topics as $topic): ?>
  2. <tr class="<?php print $topic->zebra;?>">
  3. <td class="icon"><?php print $topic->icon; ?></td>
  4. <td class="title">
  5. <div>
  6. <?php print $topic->title; ?>
  7. </div>
  8. <div>
  9. <?php print $topic->created; ?>
  10. </div>
  11. </td>
  12. <?php if ($topic->moved): ?>
  13. <td colspan="3"><?php print $topic->message; ?></td>
  14. <?php else: ?>
  15. <td class="replies">
  16. <?php print $topic->comment_count; ?>
  17. <?php if ($topic->new_replies): ?>
  18. <br />
  19. <a href="<?php print $topic->new_url; ?>"><?php print $topic->new_text; ?></a>
  20. <?php endif; ?>
  21. </td>
  22. <td class="last-reply"><?php print $topic->last_reply; ?></td>
  23. <?php endif; ?>
  24. </tr>
  25. <?php endforeach; ?>

felülírtam a saját sminkemben lévő \sites\all\themes\sajat_smink\templates\forum-topic-list.tpl.php-ben lévő kódra:
  1. <?php if (!empty($topics)):
  2. $topic_nid = 0; ?> <!--drgyz-- Notice: Undefined variable: topic_nid kivédése>
  3. <?php foreach ($topics as $topic): ?>
  4. <?php if ($topic->nid <> $topic_nid): ?> <!--drgyz-->
  5. <tr class="<?php print $topic->zebra;?>">
  6. <td class="icon"><?php print $topic->icon; ?></td>
  7. <td class="title">
  8. <div>
  9. <?php print $topic->title; ?>
  10. </div>
  11. <div>
  12. <?php print $topic->created; ?>
  13. </div>
  14. </td>
  15. <?php if ($topic->moved): ?>
  16. <td colspan="3"><?php print $topic->message; ?></td>
  17. <?php else: ?>
  18. <td class="replies">
  19. <?php print $topic->comment_count; ?>
  20. <?php if ($topic->new_replies): ?>
  21. <br />
  22. <a href="<?php print $topic->new_url; ?>"><?php print $topic->new_text; ?></a>
  23. <?php endif; ?>
  24. </td>
  25. <td class="last-reply"><?php print $topic->last_reply; ?></td>
  26. <?php endif; ?>
  27. </tr>
  28. <?php endif; ?> <!--drgyz-->
  29. <?php $topic_nid = $topic->nid ?> <!--drgyz-->
  30. <?php endforeach; ?>
  31. <?php else: ?> <!--drgyz-->
  32. <?php foreach ($topics as $topic): ?>
  33. <tr class="<?php print $topic->zebra;?>">
  34. <td class="icon"><?php print $topic->icon; ?></td>
  35. <td class="title">
  36. <div>
  37. <?php print $topic->title; ?>
  38. </div>
  39. <div>
  40. <?php print $topic->created; ?>
  41. </div>
  42. </td>
  43. <?php if ($topic->moved): ?>
  44. <td colspan="3"><?php print $topic->message; ?></td>
  45. <?php else: ?>
  46. <td class="replies">
  47. <?php print $topic->comment_count; ?>
  48. <?php if ($topic->new_replies): ?>
  49. <br />
  50. <a href="<?php print $topic->new_url; ?>"><?php print $topic->new_text; ?></a>
  51. <?php endif; ?>
  52. </td>
  53. <td class="last-reply"><?php print $topic->last_reply; ?></td>
  54. <?php endif; ?>
  55. </tr>
  56. <?php endforeach; ?>
  57. <?php endif; ?> <!--drgyz-->

Ugyanígy az "Új fórumtémák" blokk is duplán mutatja az adott fórumtémát.

Ezt pedig egy blokk nézettel oldottam meg.

0
0
etyike képe

Nem tudom szabad-e megosszam.

/* hook.module fájl tartalma */
/* a termék tulajdonságainál megjelenő ár módosítása */
function hook_form_alter(&$form, &$form_state, $form_id) {
  if (strpos($form_id, 'add_to_cart_form')) {
    $price = array();
    $name = array();
    $nid = $form['node']['#value']->nid;
    $formid = 'uc_product_add_to_cart_form_' . $nid;
    if ($form_id == $formid) {
      $my_form = $form['node']['#value'];
      $my_attributes = $my_form->attributes;
      foreach ($my_attributes as $my_attribute => $my_akey) {
        foreach ($my_attributes[$my_attribute]->options as $my_option => $my_okey) {
          if ($my_attributes[$my_attribute]->options[$my_option]->price > 0) {
            $price[$my_option] = '+' . round($form['node']['#value']->attributes[$my_attribute]->options[$my_option]->price * variable_get('exchange_value', 100)) . 'HUF'; // HUF is lehet változó
            $name[$my_option] = $form['node']['#value']->attributes[$my_attribute]->options[$my_option]->name . ', ';
          } else {
            $price[$my_option] = '';
            $name[$my_option] = $form['node']['#value']->attributes[$my_attribute]->options[$my_option]->name;
          }
        }
      }
      foreach ($form['attributes'] as $attribute => $key0) {
        if (is_numeric($attribute)) {
          foreach ($form['attributes'][$attribute] as $options) {
            if (is_array($options)) {
              foreach ($options as $option => $key1) {
                $form['attributes'][$attribute]['#options'][$option] = $name[$option] . $price[$option];
              }
            }
          }
        }
      }
    }
  }
}
/* kosárnál megjelenő ár módosítása */
function hook_uc_cart_item($op, $item) {
  switch ($op) {
    case 'load':
      $newprice = NULL;
      if (!isset($item->data['attributes'])) {
        return;
      }
      $options = _uc_cart_product_get_options($item);
      foreach ($options as $option) {
        $newprice += $option['price'];
      }
      $item->price += $newprice;
      break;
  }
}
/* template.php tartalma */
function theme_uc_price($variables) {
  return $variables['price'] = round($variables['price'] * variable_get('exchange_value', 100)) . 'HUF'; // HUF is lehet változó
}

Végiglépked a tömbökön és osztálytulajdonságokon és a megfelelő helyen hozzáadja az árat.
0
0

Kellemes és szép napot a továbbiakban
etyike

aboros képe

vagy page manager. ha csak a profiloldalba akarsz rakni egy blokkot, a profil alá vagy mellé valamelyik oldalsávba, akkor egyszerűen csinálsz egy nézetet, ami egy blokkot jelenít meg. egy argumentumot használ, user: uid, provide default argument, user id from url.

hogy ne kelljen sokat gépelni, itt egy ilyen nézet. beimportálod, létre fog hozni egy "felhasználó tartalmai" blokkot, azt beteszed mondjuk a content régióba és kész vagy. kedvedre módosítgatod, amíg az argumenthez nem nyúlsz működni fog. ;)

tadaaa:

$view = new view;
$view->name = 'user_content';
$view->description = 'Felhasználó tartalmait jeleníti meg a profil oldalon.';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'created' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'date_format' => 'time ago',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'relationship' => 'none',
  ),
  'title' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'type' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'machine_name' => 0,
    'exclude' => 1,
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'created' => array(
    'order' => 'DESC',
    'granularity' => 'second',
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'uid' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '%1 tartalmai',
    'breadcrumb' => '',
    'default_argument_type' => 'user',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 0,
    'id' => 'uid',
    'table' => 'users',
    'field' => 'uid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_fixed' => '',
    'default_argument_user' => 0,
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'page' => 0,
      'story' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_php' => '',
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
  'grouping' => 'type',
  'type' => 'ul',
));
$handler->override_option('row_options', array(
  'inline' => array(),
  'separator' => '',
  'hide_empty' => 0,
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', 'Felhasználó tartalmai');
$handler->override_option('block_caching', -1);

ahhoz hogy a page managert ajánljam, sokkal szaftosabb helyzet kéne, mondjuk aszerint, hogy a user éppen milyen role, tök más kiosztású és tartalmú profiloldalt akarsz mutatni. de önmagában talán még ez is kevés lenne, hogy a nem kicsit nehézsúlyú panels ctools page manager kombinációt kelljen bevetni, hiszen akár az előfeldolgozóban is adhatok másik "template suggestion" -t role -onként és akkor is olyan kiosztást csinálok amilyet akarok, csak hát azt .tpl.php -ba kell majd variálni ugye, nem "klikk-klikk-kész". még azt tenném hozzá, hogy ha sose láttál belülről panelst, akkor page managerrel se lesz "klikk-klikk-kész" :) hanem klikk-klikk-mérnem?! klikk-klikk-hátmegőrülökmérnem?! és ez még sokáig, aztán egyszercsak jó lesz. :)

keep it simple. azt mondják a nagyok. elég jó tanács.

0
0

-
clear: both;

Sk8erPeter képe

Ez így elég csúnya, akkor már miért nem a DS_FIELD_TYPE_FUNCTION típust használod?
Idézem:

"DS_FIELD_TYPE_FUNCTION: uses a custom function. The object, key and the complete field is passed to this function"

vagy DS_FIELD_TYPE_THEME-nél (ami szintén sokkal szebb lenne):

"DS_FIELD_TYPE_THEME: uses a theming function."

Egész pontos kódot nem tudok neked most rittyenteni, de érdemes lenne megnézni az nd.module fájlt:

pl.:

  1. /**
  2.  * Implementation of hook_ds_fields().
  3.  */
  4. function nd_ds_fields($type_name, $build_mode, $extra) {
  5.  
  6. // ...............
  7.  
  8. // Book support.
  9. if (module_exists('book') && book_type_is_allowed($type_name)) {
  10. $fields['book_navigation'] = array(
  11. 'title' => t('Book navigation'),
  12. 'type' => DS_FIELD_TYPE_FUNCTION,
  13. 'status' => DS_FIELD_STATUS_STATIC,
  14. 'properties' => array(
  15. 'formatters' => array(
  16. 'nd_book_navigation' => t('Book navigation'),
  17. ),
  18. ),
  19. );
  20.  
  21. $fields['book_add_new_child'] = array(
  22. 'title' => t('Book: add new child'),
  23. 'type' => DS_FIELD_TYPE_THEME,
  24. 'status' => DS_FIELD_STATUS_STATIC,
  25. 'properties' => array(
  26. 'formatters' => array(
  27. 'nd_book_add_new_child' => t('Add new child'),
  28. ),
  29. ),
  30. );
  31.  
  32. $fields['book_printer_version'] = array(
  33. 'title' => t('Book: printer version'),
  34. 'type' => DS_FIELD_TYPE_THEME,
  35. 'status' => DS_FIELD_STATUS_STATIC,
  36. 'properties' => array(
  37. 'formatters' => array(
  38. 'nd_book_printer_version' => t('Printer version'),
  39. ),
  40. ),
  41. );
  42. }
  43.  
  44. return array('nd' => $fields);
  45. }
  46.  
  47. // ..................................
  48.  
  49. /**
  50.  * Book navigation theming.
  51.  */
  52. function nd_book_navigation($field) {
  53. $content = '';
  54. if (isset($field['object']->content['book_navigation'])) {
  55. if (isset($field['object']->content['book_navigation']['#value'])) {
  56. $content = $field['object']->content['book_navigation']['#value'];
  57. }
  58. elseif (isset($field['object']->book['bid']) && !empty($field['object']->book['bid'])) {
  59. $content = theme('book_navigation', $field['object']->book);
  60. }
  61. }
  62. else {
  63. if (isset($field['object']->book['bid']) && !empty($field['object']->book['bid'])) {
  64. $content = theme('book_navigation', $field['object']->book);
  65. }
  66. }
  67. return $content;
  68. }
  69.  
  70. /**
  71.  * Add new child for book.
  72.  */
  73. function theme_nd_book_add_new_child($field) {
  74. if (user_access('add content to books')) {
  75. $child = str_replace('_', '-', variable_get('book_child_type', 'book'));
  76. return l(t('Add child page'), 'node/add/'. $child, array('query' => array('parent' => $field['object']->book['mlid'])));
  77. }
  78. }
  79.  
  80. /**
  81.  * Printer friendly version
  82.  */
  83. function theme_nd_book_printer_version($field) {
  84. return l(t('Printer-friendly version'), 'book/export/html/'. $field['object']->nid);
  85. }

Viszont tudod, mit nem értek egyáltalán?
Hogy miért mutat az nd.module-lal rossz példát a Display Suite:

  1. $fields['post_date'] = array(
  2. 'title' => t('Post date'),
  3. 'type' => DS_FIELD_TYPE_CODE,
  4. 'status' => DS_FIELD_STATUS_DEFAULT,
  5. 'properties' => array(
  6. 'formatters' => array(
  7. 'ds_eval_code' => t('Default'),
  8. ),
  9. 'code' => '<?php echo format_date($object->created, "custom", "d/m/Y"); ?>'
  10. ),
  11. );

Na mindegy, ez elég hülyeség, bár lehet, hogy csak szemléltető jellege van... :)

0
0
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
szt képe

Bejött a global $language; sor az elején, és egy switch vált a nyelvek alapján.

  1. function SMINKEDNEVE_date_nav_title($params) {
  2. global $language;
  3. $granularity = $params['granularity'];
  4. $view = $params['view'];
  5. $date_info = $view->date_info;
  6. $link = !empty($params['link']) ? $params['link'] : FALSE;
  7. $format = !empty($params['format']) ? $params['format'] : NULL;
  8. switch ($granularity) {
  9. case 'year':
  10. $title = $date_info->year;
  11. $date_arg = $date_info->year;
  12. break;
  13. case 'month':
  14. switch ($language->language) {
  15. case 'en':
  16. $format = !empty($format) ? $format : (empty($date_info->mini) ? 'F Y' : 'F');
  17. break;
  18. case 'hu':
  19. $format = !empty($format) ? $format : (empty($date_info->mini) ? 'Y. F' : 'F');
  20. break;
  21. }
  22. $format = !empty($format) ? $format : (empty($date_info->mini) ? 'Y. F' : 'F');
  23. $title = date_format_date($date_info->min_date, 'custom', $format);
  24. $date_arg = $date_info->year . '-' . date_pad($date_info->month);
  25. break;
  26. case 'day':
  27. $format = !empty($format) ? $format : (empty($date_info->mini) ? 'l, F j, Y' : 'l, F j');
  28. $title = date_format_date($date_info->min_date, 'custom', $format);
  29. $date_arg = $date_info->year . '-' . date_pad($date_info->month) . '-' . date_pad($date_info->day);
  30. break;
  31. case 'week':
  32. $format = !empty($format) ? $format : (empty($date_info->mini) ? 'F j, Y' : 'F j');
  33. $title = t('Week of @date', array('@date' => date_format_date($date_info->min_date, 'custom', $format)));
  34. $date_arg = $date_info->year . '-W' . date_pad($date_info->week);
  35. break;
  36. }
  37. return $title;
  38. }
3
0
ipeto képe

Nem tudom, ez közelebb visz-e a megoldáshoz, mindenesetre ezt a viselkedést se értem. Kicsit átírtam a fenti rule-t, akcióként csak üzenetet kiírva. Tehát azt kellene csinálnia, hogy egy több értéket kezelő mezőnél kiírja a régi és új értéket ott, ahol az változott:

  1. { "rules_og_oktato_karbantart_oktato_teszt" : {
  2. "LABEL" : "OG - Oktat\u00f3k karbantart\u00e1sa - oktat\u00f3 - teszt",
  3. "PLUGIN" : "reaction rule",
  4. "OWNER" : "rules",
  5. "REQUIRES" : [ "rules_conditional", "rules" ],
  6. "ON" : { "node_update--course" : { "bundle" : "course" } },
  7. "DO" : [
  8. { "LOOP" : {
  9. "USING" : { "list" : [ "node:field-oktato" ] },
  10. "ITEM" : { "list_oktato" : "Oktat\u00f3k list\u00e1ja" },
  11. "DO" : [
  12. { "LOOP" : {
  13. "USING" : { "list" : [ "node-unchanged:field-oktato" ] },
  14. "ITEM" : { "list_oktato_regi" : "Oktat\u00f3k r\u00e9gi list\u00e1ja" },
  15. "DO" : [
  16. { "CONDITIONAL" : [
  17. {
  18. "IF" : { "data_is" : { "data" : [ "list-oktato:type" ], "value" : "munkatars" } },
  19. "DO" : [
  20. { "CONDITIONAL" : [
  21. {
  22. "IF" : { "data_is" : { "data" : [ "list-oktato-regi:type" ], "value" : "munkatars" } },
  23. "DO" : [
  24. { "CONDITIONAL" : [
  25. {
  26. "IF" : { "NOT data_is_empty" : { "data" : [ "list-oktato-regi" ] } },
  27. "DO" : [
  28. { "CONDITIONAL" : [
  29. {
  30. "IF" : { "NOT data_is" : { "data" : [ "list-oktato-regi" ], "value" : [ "list-oktato" ] } },
  31. "DO" : [
  32. { "drupal_message" : { "message" : "R\u00e9gi: [list-oktato-regi:nid]-[list-oktato-regi:title] \u00daj: [list-oktato:nid]-[list-oktato:title]" } }
  33. ]
  34. }
  35. ]
  36. }
  37. ]
  38. }
  39. ]
  40. }
  41. ]
  42. }
  43. ]
  44. }
  45. ]
  46. }
  47. ]
  48. }
  49. ]
  50. }
  51. }
  52. ]
  53. }
  54. }
  55. ]
  56. }
  57. }

A tesztelésnél két értéke volt a mezőnek: régi1 és régi2, utóbbit átírtam új2-re. Tehát véleményem szerint a fenti szabálynak így csak egy üzenetet kellene kiírnia, merthogy benne van a list-oktato-regi <> list-oktato feltétel.
Ehhez képest a következő hármat adta vissza:
régi2 - régi1
régi1 - új2
régi2 - új2

Ezek alapján nyilván elronthatok valamit a rule összerakásában, de nem igazán találom, hogy mit.:S

SZERK.

Ja, és ami még érdekes, hogy akkor is lefuta a szabály, amikor változás nélkül mentem el, rádásul két üzenettel tér vissza:
régi1 - régi2
régi2 - régi1

0
0

Views Cloud probléma

Gabee képe

Sziasztok!

Egy olyan "kisebb" problémával szenvedek már jóideje, hogy letöltöttem a drupal.org-ról a views cloud modult, és elkezdtem beállítgatni.

A blokk része működik is már rendesen, viszont ha a blokkban rákattintok egy szóra, akkor a megadott oldalon megintcsak ugyan az a kulcsszó jelenik meg, és újbóli rákattintásra jön(nek) elő a kulcsszóhoz tartozó node-ok.

Ehhez kéne nekem valami segítség hogy milyen is a megfelelő beállítás, mert már a maradék hajamat is kitéptem, de sehogysem boldogulok vele.

Csakhogy bizonyítsam az amatőrködésemet, bemásolom a views "kódját".

Drupal verzió: 
Melyik modulhoz, modulokhoz kapcsolódik a téma?: 
szogedi képe

Azt hiszem, hogy meg fogok birkózni a php programozással is, mivel rá fogok kényszerülni. Kis cégnél dolgozom, muszály mindenhez érteni. :(

Ha jól tippelek, akkor így kellene kinéznie a kódnak: http://szogedi.dyndns.org:151/vars.htm?user=proba&pwd=proba

A megnyíló frameset-et tartalmazó html oldal kódja, név nélkül, mert azt nem sikerült kiderítenem:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title></title>
</head>
 
<frameset rows="0%,100%" frameborder="no" border="0" framespacing="0">
	<frame name="vars" src="vars.htm" frameborder="no"></frame>
	<frame name="main" frameborder="no"></frame>
</frameset><noframes></noframes>
 
</html>

A vars.htm a következőt tartalmazza

<script language = "javascript">
var msid = '0009455B26A7';
var alias = 'onlinecamera1';
var camera_port = 38656;
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title></title>
</head>
 
<script language = "javascript">
 
var user = '';
var pwd = '';
var language = 'english';
 
</script>
 
<body>
 
<script language = "javascript">
	language = 'english';
	parent.main.location = 'login.htm';	
</script>
 
</body>
</html>

A login.htm forrása a következő:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>a{color:000000;TEXT-DECORATION:none}a:hover{color:FF0000;TEXT-DECORATION:underline}</style>
<style>
.rect_bottom{border-top-width:1px; border-top-style:none; border-right-style:solid; border-bottom-style:solid; border-left-style:solid; border-top-color:#CC9933; border-right-color:#CC9933; border-bottom-color:#CC9933; border-left-color:#CC9933; border-right-width:1px; border-bottom-width:1px; border-left-width:1px;} 
.rect_left{border-top-width:1px; border-top-style:solid; border-right-style:none; border-bottom-style:solid; border-left-style:solid; border-top-color:#CC9933; border-right-color:#CC9933; border-bottom-color:#CC9933; border-left-color:#CC9933; border-right-width:1px; border-bottom-width:1px; border-left-width:1px;} 
.rect_right{border-top-width:1px; border-top-style:solid; border-right-style:solid; border-bottom-style:solid; border-left-style:none; border-top-color:#CC9933; border-right-color:#CC9933; border-bottom-color:#CC9933; border-left-color:#CC9933; border-right-width:1px; border-bottom-width:1px; border-left-width:1px;} 
</style>
<title></title>
</head>
 
<script language = "javascript">
 
function getcookie(name)
{
	var strCookie = document.cookie;
    var arrCookie = strCookie.split("; ");
    for (var i = 0;i < arrCookie.length;i ++)
    {
		var arr = arrCookie[i].split("=");
        if (arr[0] == name)
			return unescape(arr[1]);
    }
 
    return "";
}
 
function setcookie(name,value,expirehours)
{
	var cookieString = name + "=" + escape(value);
    if (expirehours > 0)
    {
		var date = new Date();
        date.setTime(date.getTime() + expirehours * 3600 * 1000);
        cookieString = cookieString + "; expires=" + date.toGMTString();
	}
    document.cookie=cookieString;
}
 
parent.vars.language = getcookie('language');
if (parent.vars.language == '')
	parent.vars.language = 'english';
 
if (parent.vars.language == 'simple_chinese')
	document.write('<script src = "simple_chinese/string.js"><\/script>');
else if (parent.vars.language == 'traditional_chinese')	
	document.write('<script src = "traditional_chinese/string.js"><\/script>');
else
	document.write('<script src = "english/string.js"><\/script>');
 
</script>	
 
<script language = "javascript">
 
if (parent.vars.alias == '')
	parent.vars.alias = str_anonymous;
 
parent.document.title = str_device + '(' + parent.vars.alias + ')';
 
function user_onkeypress()
{
	if (window.event.keyCode == 13)
		pwd.focus();
}
 
function pwd_onkeypress() 
{
	if (window.event.keyCode == 13)
		monitor_link.focus();
}
 
function set_language(language)
{
	setcookie('language',language,720);
	location.reload();
}
 
function monitor()
{
	parent.vars.user = user.value;	
	parent.vars.pwd = pwd.value;	
	self.location = 'monitor.htm';
}
 
</script>
 
<body>
 
<table border=0 cellpadding=0 cellspacing=0 width=814 height = 450 bgcolor="#d8d8d8" bgcolor="">
	<tr height="450">
		<td width = 200 class="rect_left">&nbsp;</td>
		<td width = 614 class="rect_right" valign = top>
			<table border=0 cellpadding=0 cellspacing=0>
				<tr><td height = 80> </td></tr>
				<tr><td height = 40 style="font-size:24px; color:#004080"><strong><script language="javascript">document.write(str_signin2device + ' (' + parent.vars.alias + ')');</script></strong></td></tr>
				<tr><td height=20> </td></tr>
				<tr><td height=80><table border=0 cellpadding=0 cellspacing=0>
					<tr height="40">
						<td width = 100 style="font-size:18px; color:#004080"><strong>&nbsp;&nbsp;&nbsp;&nbsp;<script language="javascript">document.write(str_user);</script></strong></td>
						<td><INPUT id=user name=user maxLength=32 LANGUAGE=javascript onKeyPress="return user_onkeypress()"></td>
					</tr>
					<tr height="40">
						<td style="font-size:18px; color:#004080"><strong>&nbsp;&nbsp;&nbsp;&nbsp;<script language="javascript">document.write(str_pwd);</script></strong></td>
						<td><INPUT id=pwd name=pwd type = "password" maxLength=32 LANGUAGE=javascript onKeyPress="return pwd_onkeypress()"></td>
					</tr>
				</table></td></tr>	
				<tr height="20"><td> </td></tr>
				<tr><td height = 60><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A id = monitor_link href = "javascript:monitor()" style="font-size:18px; color:blue"><script language="javascript">document.write(str_signin);</script></A></strong></td></tr>
				<tr><td height = 30><hr></td><td><hr></td></tr>
				<tr><td height = 30 style="font-size:12px;"><strong><script language="javascript">document.write(str_attention);</script></strong></td></tr>
				<tr><td height = 20 style="font-size:12px;"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<script language="javascript">document.write(str_attention1);</script></strong></td></tr>
				<tr><td height = 20 style="font-size:12px;"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<script language="javascript">document.write(str_attention2);</script></strong></td></tr>
 
			</table>
		</td>
	</tr>
</table>
 
<table border=0 cellpadding=0 cellspacing=0 width=814 height = 30 bgcolor="#4791c5">
	<tr><td class="rect_bottom">&nbsp;&nbsp;
		&nbsp;&nbsp;<a href = "javascript:set_language('english')" style="font-size:12px; color:white">english</a>
		&nbsp;&nbsp;<a href = "javascript:set_language('simple_chinese')" style="font-size:12px; color:white">简体中文</a>
		&nbsp;&nbsp;<a href = "javascript:set_language('traditional_chinese')" style="font-size:12px; color:white">繁體中文</a>
	</td></tr>
</table>
 
</body>
</html>

Amennyire én látom, ez az url-es módszer ott bukik meg, hogy keretben nyílik meg az oldal. Ettől még lehet működésre bírni???

0
0
opera11 képe

Meglehet csinálni szebben is és akkor nem kell mindig egy távoli kiszolgálóról töltögetni:
http://klap.hu/blog/agyo-addthis-udv-helyi-kod

A kód kb ennyi:

<DIV id="dock"> 
<DIV class="dock-container"> 
<script>function iwiws_click() {u=location.href;t=document.title; window.open('http://iwiw.hu/pages/share/share.jsp?u='+encodeURIComponent(u)+'&t='+ encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script>
<a class="dock-item" rel="nofollow" href="" title="Megosztom az iWiW-en" onclick="return iwiws_click()" target="_blank"><SPAN>iWiW</SPAN><img style="border: 0" src="http://klap.hu/sites/default/files/kepek/ikon/iwiw.png" alt="iWiW"></a>
 
<script>function fbs_click() {u=location.href;t=document.title; window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+ encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436'); return false;}</script>
<a  class="dock-item" rel="nofollow" href="" title="Beküldöm a Facebook-ra"  onclick="return fbs_click()" target="_blank"><SPAN>Facebook</SPAN><img src="http://klap.hu/sites/default/files/kepek/ikon/facebook.png" alt="Facebook" ></a> 
 
<script>function mysps_click() {u=location.href;t=document.title; window.open('http://www.myspace.com/Modules/PostTo/Pages/?u='+encodeURIComponent(u)+'&t='+ encodeURIComponent(t),'sharer','toolbar=0,status=0,width=825,height=725'); return false;}</script>
<a class="dock-item" rel="nofollow" href="" title="Elküldés a MySpace-re" onclick="return mysps_click()" target="_blank"><SPAN>MySpace</SPAN><img style="border: 0" src="http://klap.hu/sites/default/files/kepek/ikon/myspace.png" alt="MySpace"></a>
 
<script>function tws_click() {u=location.href;t=document.title; window.open('http://twitter.com/home?status='+encodeURIComponent(t)+':+'+ encodeURIComponent(u),'sharer','toolbar=0,status=0,width=775,height=380'); return false;}</script>
<a  class="dock-item" rel="nofollow" href="" title="Elcsirippelem a Twitteren" onclick="return tws_click()" target="_blank"><SPAN>Twitter</SPAN><img src="http://klap.hu/sites/default/files/kepek/ikon/twitter.png" alt="Twitter" ></a> 
 
<a class="dock-item" rel="nofollow" title="Google Reader-be dobom" href="javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&amp;&amp;!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/link-bookmarklet.js');void(b.appendChild(z));}else{}"><SPAN>Reader</SPAN><img alt="Google reader" src="http://klap.hu/sites/default/files/kepek/ikon/google-reader.png" border="0"/></a>
 
<a class="dock-item" rel="nofollow" href="http://www.startlap.hu/" onclick="window.open('http://www.startlap.hu/sajat_linkek/addlink.php?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title));return false;" title="Startlap.hu könyvjelzőihez"><SPAN>Startlap</SPAN><img alt="Startlap.hu" src="http://klap.hu/sites/default/files/kepek/ikon/startlap.png" border="0"/></a>
 
<script>function gkonyv_click() {u=location.href;t=document.title; window.open('http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(u)+'&title='+ encodeURIComponent(t),'sharer','toolbar=0,status=0,width=825,height=725'); return false;}</script>
<a class="dock-item" rel="nofollow" href="" title="Google könyvjelzőzök közé" onclick="return gkonyv_click()" target="_blank"><SPAN>Google</SPAN><img style="border: 0" src="http://klap.hu/sites/default/files/kepek/ikon/google.png" alt="Google"></a>
 
<script>function delicious_click() {u=location.href;t=document.title; window.open('http://delicious.com/save?jump=yes&partner=addthis&url='+encodeURIComponent(u)+'&title='+ encodeURIComponent(t),'sharer','toolbar=0,status=0,width=825,height=725'); return false;}</script>
<a class="dock-item" rel="nofollow" href="" title="Elmentés a Delicious-ba" onclick="return delicious_click()" target="_blank"><SPAN>Delicious</SPAN><img style="border: 0" src="http://klap.hu/sites/default/files/kepek/ikon/delicious.png" alt="Delicious"></a>
</div></div>
0
0