lili_ képe

a Te kódodból először is hiányzott egy ( jel a $items['om_kereso'] = array kódsorod végén,

nekem így működik csak egy kicsit más a modulom neve de az ne zavarjon téged

function ahahdemo_menu() {
 
  $items = array();
 
 
$items['om_kereso'] = array(
    'title' => 'OM kereső',
    'page callback' => 'ahahdemo_om_kereso_oldal',
    'description' => t('keresés'),
    'access arguments' => array('access content'),
    'type' => MENU_NORMAL_ITEM,
  );
  return $items;
}
 
function ahahdemo_om_kereso_oldal_form(&$form_state){
 
 
 $form = array();
 
    $form['name'] = array(
    '#type' => 'textfield',
    '#title' => t('om keresés'),
  );
    $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );
 
  return $form;
 
 
}
 
function ahahdemo_om_kereso_oldal(){
$h="";
 
$h.="alma";
 
$l=drupal_get_form("ahahdemo_om_kereso_oldal_form");
 
$h.="<br/>";
 
$h.=$l;
 
return $h;
 
}
0
0

mini

tiburi képe

Köszi, írtam a szolgáltatónak és azt a rövid választ kaptam, hogy
"upload_max_filesize 64M -> 64MB-ot tud feltölteni jelenleg."

A drupalban a filefield mezőben azonban továbbra is 16M korlátozást látok.

Ha nekem kell valamit átállítanom, azt hol kell?

A webhely beállításainál a "fájl feltöltések" opcióban az adminisztrátornak nem tudok beállítani nagyobb méretet (igaz ez nem is a filefield mezőkre vonatkozik, csak próbálkoztam), mert ezt írja ki:

A PHP beállítások 16 MB méretre korlátozzák a feltöltésenkénti maximális fájlméretét.
A kiszolgáló-környezet függvényében a beállítások a rendszerszintű php.ini fájlban, a Drupal könyvtárában lévő php.ini fájlban, a Drupal settings.php fájljában vagy a Drupal gyökerében lévő .htaccess fájlban módosíthatóak.

A php.ini beállítása a hosting dolga, a .htaccess fájlban pedig nem látok opciót erre vonatkozóan:

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
  Order allow,deny
</FilesMatch>
 
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
 
# Follow symbolic links in this directory.
Options +FollowSymLinks
 
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
 
# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
  # There is no end quote below, for compatibility with Apache 1.3.
  ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>
 
# Set the default handler.
DirectoryIndex index.php
 
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
 
# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>
 
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>
 
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>
 
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On
 
  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600
 
  # Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>
 
# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
 
  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
 
  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /
 
  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
 
# $Id: .htaccess,v 1.90.2.3 2008/12/10 20:04:08 goba Exp $

Tudja valaki, hogy mit kellene beírnom ide, hogy menjen a dolog?

Előre is köszi!

0
0
eager képe

Úgy tűnik, hogy a $title-t a template_process_page()-ben lehet kiiktatni. Ettől a page.tpl.php nem printel oda semmit.

A kihívás nekem abban áll, hogy megbízhatóan és szépen sikerüljön beazonosítani, ha profiloldalon vagyunk (könnyen lehet, hogy az alábbi se nem szép, se nem eléggé megbízható...).

Ezt sikerült összehozni:

  1. function MYTHEME_process_page(&$variables) {
  2.  
  3. // An attempt to tell if we are on the user profile page.
  4. if (!empty($variables['page']['content']['system_main']['#theme']) &&
  5. $variables['page']['content']['system_main']['#theme']== 'user_profile') {
  6.  
  7. // Unsetting the title with setting to an empty string.
  8. // The page.tpl.php won't print anything.
  9. $variables['title'] = '';
  10. }
  11. }

EDIT:

Ja igen, szóval hogy keletkezik nálad a

$variables['page']['content']['system_main']['profiloldal']

tömb? Én a template_preprocess_html() variabléi között hasonlót sem találtam (odáig megvan, hogy 'system_main', de abban semmi ilyen használhatóbb dolog, semmi, ami #title-t, vagy akár hasonlót tartalmazna). (Másik dolog, hogy a preprocess_html()-ben nem tudom, hogy hogyan kell olyat tenni, aminek a hatását aztán a template_process_page()-ben is látom, hogy ott feltételként tudjam használni.)

Ha valaki tudna elegánsabb megoldást, azt szívesen megismerném.

1
0
Illyés Edit képe

Sminkben átkergeted a t()-n, és akkor az első oldallekérés után elérhetővé válik a felületfordítási oldalon.

content-field.tpl.php:

<?php if (!$field_empty) { ?>
  <div class="field field-type-<?php print $field_type_css; ?> field-<?php print $field_name_css; ?>">
 
    <?php if ($label_display == 'above') { ?>
      <div class="field-label"><?php print t($label); ?>:&nbsp;</div>
    <?php } ?>
 
    <div class="field-items">
      <?php $count = 1;
      foreach ($items as $delta => $item) {
        if (!$item['empty']) { ?>
          <div class="field-item <?php print ($count % 2 ? 'odd' : 'even'); ?>">
            <?php if ($label_display == 'inline') { ?>
              <div class="field-label-inline<?php print($delta ? '' : '-first'); ?>">
                <?php print t($label); ?>:&nbsp;
              </div>
            <?php } ?>
            <?php print $item['view']; ?>
          </div>
        <?php $count++;
        }
      } ?>
    </div>
 
  </div>
<?php } ?>

Persze lehet mondani, hogy ez így nem szép. De legalább működik.

0
0

Alsmink bekapcsolásakor hiba - mit hagytam ki?

pityu73 képe

Sziasztok!
Ezen a sminken (Skeleton) szeretnék apróbb módosításokat eszközölni.
Ehhez létrehoztam egy alsminket az itt leírtak alapján.

Tehát az alsminkem mappája:
fpinfinity
-fpinfinity.css
-fpinfinity.info

az fpinfinity.info tartalma:

Fórum: 
Drupal verzió: 

Megadott e-mailcímre file elküldése

Gabee képe

Sziasztok!

Azt szeretném megvalósítani hogy van egy e-mail mező megjelenítve, és ha vki beírja az e-mailcímét akkor azonnal elküldjön a címre egy adott szöveget és egy file-t mellékelve.

Ezt én megpróbáltam "normál" php-vel megoldani, de vmiért nagyon nem akar működni, ugyanis van amikor elküldi, van amikor nem nyitható meg a csatolmány, és már teljesen kiborultam tőle.

Segítségként csatolom a jelenlegi forrást, hátha jó lesz kiindulónak.

<form method="post" accept-charset="utf-8" action="">
Fórum: 

Fivestar modul field-jéhez egyedi hozzáférés vagy megjelenítés

burney képe

Sziasztok!

A fivestar modullal egy node-onkénti szavazást valósítottam meg. Minden node tartalmára lehet szavazni egy 1-10-es skálán. Szeretnék egy egyedi logikát alkalmazni aszerint, hogy mely node-okra lehet szavazni és melyekre nem. Első körben azzal próbálkoztam, hogy a fivestar egy saját hook-ját hívom meg egy saját modulban.

Az alkalmazott hook:

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

SubTheme nem működik

agostonl képe

Sziasztok!

Ez alapján összeraktam egy alsminket, de ha aktíválom, nem tölti be az eredeti smink css fájljait.

Mit rontok el?

Fórum: 
Drupal verzió: 
Melyik modulhoz, modulokhoz kapcsolódik a téma?: 
Taxonomy upgrade extras: 
alippai képe

Bocsánat, nem egészen értem. A szűrők a cikkek szűrésére jók - nem azért nem írja ki, hogy 26. hét mert üres lenne a mező.

  $view = new stdClass();
  $view->name = 'archive';
  $view->description = 'Heti archívum';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = 'Archívum';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'teaser';
  $view->url = 'archive';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10';
  $view->sort = array (
    array (
      'tablename' => 'node_data_field_articleweight',
      'field' => 'field_articleweight_value',
      'sortorder' => 'DESC',
      'options' => '',
    ),
    array (
      'tablename' => 'node',
      'field' => 'created',
      'sortorder' => 'DESC',
      'options' => 'normal',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'content: field_lapszam',
      'argdefault' => '5',
      'title' => '',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'cikk',
),
    ),
    array (
      'tablename' => 'node_data_field_lapszam',
      'field' => 'field_lapszam_value_default',
      'operator' => '!=',
      'options' => '',
      'value' => '',
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(node_data_field_articleweight, node, node_data_field_lapszam);
  $views[$view->name] = $view;

Ez az alábbi kimenetet adja:
  • (16)
  • De nekem ez kell:

  • 26. hét (16)
  • Már csak a Theme Wizard segítségével kell átalakítani, vagy valami még hiányzik? :$
    Az eddigieket is köszi

    0
    0

    Lippai Ádám
    young element

    Pasqualle képe

    Nos, meg is van (drupal 6hoz). Csak hozzaadni tudsz jogosultsagot. Modositasra es torlesre mar lusta voltam..
    Szoval ezzel a kis modullal sajat jogosultsagokat hozhatsz letre (az admin/user/permissions oldalon megjelenik egy "add permission" ful), akar minden viewhoz egy sajat jogosultsagot. Igy csak bekattingatod, hogy az egyes csoportok mely view-kat lathatjak.

    szolj ha hasznat tudtad venni..

    custom_perm.info

    name = Custom permissions
    description = Create custom permissions
    core = "6.x"

    custom_perm.module
    function custom_perm_menu() {
      $items['admin/user/permissions/list'] = array(
        'title' => 'List',
        'type' => MENU_DEFAULT_LOCAL_TASK,
        'weight' => -10,
      );
      $items['admin/user/permissions/add'] = array(
        'title' => 'Add permission',
        'page callback' => 'drupal_get_form',
        'page arguments' => array('custom_perm_add_permission'),
        'access callback' => 'user_access',
        'access arguments' => array('administer permissions'),
        'type' => MENU_LOCAL_TASK,
      );
    return $items;
    }
     
    function custom_perm_perm() {
      return variable_get('custom_permissions', array());
    }
     
    function custom_perm_add_permission(&$form_state) {
      $form['permission_name'] = array(
        '#type' => 'textfield',
        '#title' => t('Permission name'),
        '#default_value' => '',
        '#description' => t('Create new custom permission. Can be used for fine-tuning views access.'),
        '#required' => TRUE,
      );
     
      $form['submit'] = array(
        '#type' => 'submit',
        '#value' => t('Save'),
      );
     
      return $form;
    }
     
    function custom_perm_add_permission_validate($form, &$form_state) {
      $perm_name = check_plain($form_state['values']['permission_name']);
      $permissions = module_invoke_all('perm');
      if (in_array($perm_name, $permissions)) {
        form_set_error('custom_perm_add_permission', t('Permission %perm_name already exists.', array('%perm_name' => $perm_name)));
      }
    }
     
    function custom_perm_add_permission_submit($form, &$form_state) {
      $form_state['redirect'] = 'admin/user/permissions';
      $perm_name = check_plain($form_state['values']['permission_name']);
     
      $custom_perms = variable_get('custom_permissions', array());
      $custom_perms = array_merge(array(0 => $perm_name), $custom_perms);
      variable_set('custom_permissions', $custom_perms);
      drupal_set_message(t('The permission %perm_name has been created.', array('%perm_name' => $perm_name)));
    }
    0
    0