Jhorvath képe

Nem erőlködöm az ini-vel. (Szerintem jól van beállítva.)

  1. λ php --ini
  2. Configuration File (php.ini) Path: C:\WINDOWS
  3. Loaded Configuration File: C:\Program Files\PHP 7.4\php.ini
  4. Scan for additional .ini files in: (none)
  5. Additional .ini files parsed: (none)

php -c "c:\Program Files\PHP 7.4\php.ini" c:\ProgramData\ComposerSetup\bin\composer.phar status

Akár közvetlen hívva a composer-t vagy php -t felparaméterezve minden jól megy csak valóban a zip akad el amikor a drupal\core -t olvassa.

phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Downloader/ZipDownloader.php on line 154

"Érdemes lenne valami unzip lehetőséget feltelepíteni a rendszerre"

Ezt hogy kell érteni?

0
0
charliefilip képe

Most igy van a fájl tartalma:

 
<VirtualHost *:80>
   ServerName drupal
   DocumentRoot "c:/drupal"
</VirtualHost>
<Directory "C:/drupal">
   Order allow, deny
   Allow from all
</Directory>

és nem tudom ujra inditani az apache-ot
a c: létrehoztam a drupal könyvtárat és benne van a drupal telepítéséhez szükséges csomag.
az XAMPP a C:/xampp mappába települt
utolso logbejegyzések:
 
[Thu Apr 10 07:20:55 2008] [notice] Parent: Created child process 3768
[Thu Apr 10 07:20:57 2008] [notice] Child 3768: Child process is running
[Thu Apr 10 07:20:57 2008] [notice] Child 3768: Acquired the start mutex.
[Thu Apr 10 07:20:57 2008] [notice] Child 3768: Starting 250 worker threads.
[Thu Apr 10 07:20:57 2008] [notice] Child 3768: Starting thread to listen on port 443.
[Thu Apr 10 07:20:57 2008] [notice] Child 3768: Starting thread to listen on port 80.
[Thu Apr 10 07:21:04 2008] [error] [client 127.0.0.1] client denied by server configuration: C:/drupal/
0
0

FKJ

BergR képe

Megcsináltam amit kértél de nekem nem működik, tuti én vagyok a béna!

newuser.info
newuser.modul

newuser mappában a /modules mappába felmásoltam de a modullistában sajnos nekem nem szereplt, nem tudtam engedélyezni sem:(

De a drupal.org-on találtam ezt.:

<?php
// Count users with activity in the past defined period.
$interval = time() - 900;
 
// Perform database queries to gather online user lists.  We use s.timestamp
// rather than u.access because it is much faster is much faster..
$anonymous_count = sess_count($interval);
$authenticated_users = db_query('SELECT u.uid, u.name FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= %d AND s.uid > 0 ORDER BY s.timestamp DESC', $interval);
$authenticated_count = db_num_rows($authenticated_users);
 
// Format the output with proper grammar.
if ($anonymous_count == 1 && $authenticated_count == 1) {
  $output = t('There is currently %members and %visitors online.', array('%members' => format_plural($authenticated_count, '1 user', '@count users'), '%visitors' => format_plural($anonymous_count, '1 guest', '@count guests')));
}
else {
  $output = t('There are currently %members and %visitors online.', array('%members' => format_plural($authenticated_count, '1 user', '@count users'), '%visitors' => format_plural($anonymous_count, '1 guest', '@count guests')));
}
 
echo $output;
?>

Ezt 1 blokkba téve egészen szépen működik

Pont olyan mint a felhasználó blokk csak ez valóban az egész webhely jelenlévőit mutatja és nem csak az aktuális oldalét!

Azért nagyon szépen köszönöm, hogy próbáltál segíteni!!!

0
0
aboros képe

vagy beletúrsz a .tpl.php -ba, az is jó.

vagy: az előfeldolgozóban új értékeket is fűzhetsz a tömbhöz, nem csak módosíthatod azt. amiket hozzáadsz, a kulcsuk alapján éred majd el a .tpl.php -ban...
kábé így:
template.php:

function playground_preprocess_node($vars) {
  $node = $vars['node']; #lusta aboros
  if (isset($node->field_image[0])) {
    $vars['content'] = $node->content['body']['#value'];
    $images = '';
    foreach ($node->field_image as $key=>$image) {
      $images .= '<div class="image">' . $image['data']['view'] . '</div>';
    }
    $vars['images'] = $images;
  }
}

ennek hatására a .tpl.php -ban lesz egy $images változód, ami egy sztring és div class='image' tegek között benne vannak a képek, a $content -ben meg már nincsenek benne.

node.tpl.php nagy vonalakban:

<?php if ($images) : ?>
  <div class="images"><?php print $images; ?></div>
<?php endif; ?>
<h2><?php print $node->title; ?></h2>
<div class="content">
  <?php print $content ?>
</div>

(pl) style.css:

.images {
float: right;
margin: .5em 0 0 1em;
}
0
0

-
clear: both;

makgab képe

Magától kell működnie, de még valami feltétel hiányzik.
A user.module részlete:

<?php
// ------------------------
function user_help($path, $arg) {
  global $user;
 
  switch ($path) {
    case 'admin/help#user':
      $output = '<p>'. t('The user module allows users to register, login, and log out. Users benefit from being able to sign on because it associates content they create with their account and allows various permissions to be set for their roles. The user module supports user roles which establish fine grained permissions allowing each role to do only what the administrator wants them to. Each user is assigned to one or more roles. By default there are two roles <em>anonymous</em> - a user who has not logged in, and <em>authenticated</em> a user who has signed up and who has been authorized.') .'</p>';
      $output .= '<p>'. t("Users can use their own name or handle and can specify personal configuration settings through their individual <em>My account</em> page. Users must authenticate by supplying a local username and password or through their OpenID, an optional and secure method for logging into many websites with a single username and password. In some configurations, users may authenticate using a username and password from another Drupal site, or through some other site-specific mechanism.") .'</p>';
      $output .= '<p>'. t('A visitor accessing your website is assigned a unique ID, or session ID, which is stored in a cookie. The cookie does not contain personal information, but acts as a key to retrieve information from your site. Users should have cookies enabled in their web browser when using your site.') .'</p>';
      $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@user">User module</a>.', array('@user' => 'http://drupal.org/handbook/modules/user/')) .'</p>';
      return $output;
    case 'admin/user/user':
      return '<p>'. t('Drupal allows users to register, login, log out, maintain user profiles, etc. Users of the site may not use their own names to post content until they have signed up for a user account.') .'</p>';
    case 'admin/user/user/create':
    case 'admin/user/user/account/create': 
 
// ----------- ...stb.
?>

Itt az 'admin/user/user' esetében automatice megjelenik a "[további segítség...]" link, ami az 'admin/help#user' hivatkozás.

G.

0
0
Sami képe

A search modul mappájában lévő search-result.tpl.php fájlba nyúltam bele.

Így nézett ki eredetileg az átdolgozott rész:

<dt class="title">
  <a href="<?php print $url; ?>"><?php print $title; ?></a>
</dt>
<dd>
  <?php if ($snippet) : ?>
    <p class="search-snippet"><?php print $snippet; ?></p>
  <?php endif; ?>
  <?php if ($info) : ?>
  <p class="search-info"><?php print $info; ?></p>
  <?php endif; ?>
</dd>

És így egészítettem ki egy kis html kóddal:

<div class="thenode">
<dt class="title">
  <a href="<?php print $url; ?>"><?php print $title; ?></a>
</dt>
<dd>
  <?php if ($snippet) : ?>
    <p class="search-snippet"><?php print $snippet; ?></p>
  <?php endif; ?>
  <?php if ($info) : ?>
  <p class="search-info"><?php print $info; ?></p>
  <?php endif; ?>
</dd>
</div>

A sminkem css-ében létrehoztam a .thenode class-ot és megadtam benne a float:left kódot, így a találatok nem egymás alá, hanem egymás mellé listázza:

.thenode { float:left, width:200px; }

A php nyelvet csak most tanulom sajnálatosan, így azt már nem tudtam megoldani, hogy az egyes találatok milyen mezőket jelenítsenek meg. Konkrétan nekem egy thumnail, egy nézettségszámláló, egy időtartam mutató és egy rating kell még. Szóval minden ami egy videómegosztó oldalba szükséges videókeresésnél. Remélem hamarosan sikerül megcsinálnom.

dj!

Esetleg te is egy videómegosztó oldalon ügyködsz?

0
0
makgab képe

CSS-ben kell módosítani? Kikommenteztem a nem szükséges részt (elvileg):

/****************************************/
/*          COLUMN LAYOUTS              */
/*                                      */
/* Classes for different column layouts */
/* that are applied to the <body> tag.  */
/****************************************/
 
 
 
/************************/
/* SINGLE COLUMN LAYOUT */
/* (Main Content)       */
/************************/
 
//body.layout-main #content-wrapper {
//  margin: 24px 0 0 0;    /* LTR */
//  width: 960px;
//}
 
/**************************/
/*   TWO COLUMN LAYOUT    */
/* (Sidebar:Main Content) */
/**************************/
body.layout-first-main #sidebar-first {
  margin: 24px 14px 0 0;
//  width: 240px;
  width: 18%;
}
 
 
body.layout-first-main #content-wrapper {
  margin: 34px 0 0 0;    /* LTR */
//  width: 706px;
  width: 79.9%;
}
 
/**************************/
/*   TWO COLUMN LAYOUT    */
/* (Main Content:Sidebar) */
/**************************/
//body.layout-main-last #content-wrapper {
//  margin: 32px 20px 0 0;
//  position: relative;
//  width: 470px;
//  z-index: 1;
//}
 
//body.layout-main-last #sidebar-last {
//  background-color: transparent;
//  margin: 32px 0 0 0;
//  width: 470px;
//}
 
/**********************************/
/*      THREE COLUMN LAYOUT       */
/* (Sidebar:Main Content:Sidebar) */
/**********************************/
//body.layout-first-main-last #sidebar-first {
//  margin: 40px 20px 0 0;    /* LTR */
//  width: 240px;
//}
 
//body.layout-first-main-last #content-wrapper {
//  margin: 40px 0 0;
//  width: 700px;
//}
 
//body.layout-first-main-last #content-wrapper #content-inner {
//}
 
//body.layout-first-main-last #content-wrapper #sidebar-last {
// background-color: #F4F7E7;
//  margin: 0;
//  padding: 0 0 0 20px;    /* LTR */
//  width: 280px;
//}
 
//body.full-node.layout-first-main-last #sidebar-last {
//  margin: 0;
//}

Ez már majdnem jó, csak a tartalmak "elcsúsznak". Az elős pl. jó, a második viszont jobbra csúszott és egy kicsit bele az elsőbe... :O

G.

0
0
szj képe

Elnézést az eddigi körülményeskedésért...
Arról van szó, hogy egy vertical accordion menüt szeretnék betenni block-ba.
Többel is próbálkoztam, itt van az egyik:

/***********************************************
* Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

ddaccordion.init({
headerclass: "expandable", //Shared CSS class name of headers group that are expandable
contentclass: "categoryitems", //Shared CSS class name of contents group
revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
mouseoverdelay: 300, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated into view?
persiststate: false, //persist state of opened contents within browser session?
toggleclass: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: "slow", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
//do nothing
},
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
//do nothing
}
})

.arrowlistmenu{
width: 150px; /*width of accordion menu*/
}

.arrowlistmenu .menuheader{ /*CSS class for menu headers in general (expanding or not!)*/
font: bold 14px Arial;
color: white;
background: black url(/start/sites/default/files/bullet/titlebar.png) repeat-x center left;
margin-bottom: 10px; /*bottom spacing between header and rest of content*/
text-transform: uppercase;
padding: 4px 0 4px 10px; /*header text is indented 10px*/
cursor: hand;
cursor: pointer;
}

.arrowlistmenu .openheader{ /*CSS class to apply to expandable header when it's expanded*/
background-image: url(/start/sites/default/files/bullet/titlebar-active.png);
}

.arrowlistmenu ul{ /*CSS for UL of each sub menu*/
list-style-type: none;
margin: 0;
padding: 0;
margin-bottom: 8px; /*bottom spacing between each UL and rest of content*/
}

.arrowlistmenu ul li{
padding-bottom: 2px; /*bottom spacing between menu items*/
}

.arrowlistmenu ul li a{
color: #A70303;
background: url(/start/sites/default/files/bullet/arrowbullet.png) no-repeat center left; /*custom bullet list image*/
display: block;
padding: 2px 0;
padding-left: 19px; /*link text is indented 19px*/
text-decoration: none;
font-weight: bold;
border-bottom: 1px solid #dadada;
font-size: 90%;
}

.arrowlistmenu ul li a:visited{
color: #A70303;
}

.arrowlistmenu ul li a:hover{ /*hover state CSS*/
color: #A70303;
background-color: #F3F3F3;
}

A tüneteket ugye már korábban leírtam.

Megköszönök minden segítséget előre is.

SzJ

0
0
kalmarr képe

Nagyon köszönöm a segítségedet!

Ha jól értettem, Te egy modult készítettél nekem :). Végül is ez a legtökéletesebb dolog, mert ezt bárhol fel lehet használni és szerintem nem csak nekem lesz erre szükségem :).

Javaslom tedd fel a drupal.org -ra is a modulok közé!

Hiba:

Továbbra sem történik semmi :(. Továbbá az node/%/delete/iframe utvonal a "delete" miatt nem azt jelenti, hogy ki akarom törölni adott oldalt?. Tőlem mindig ezt kérdezi.

Kezdjük az elejéről, hogy biztos egy dologra gondoljunk :).

A modul nekem rendben meg is jelenik a modul hozzáadásnál és hozzá is tudom adni. Tehát amit készítettem elvileg jó.

Ha modul, akkor a következő kötelező file okat kell létre hozni.

A module könyvtáron belül "mymodule" és ebbe tettem a következő fileokat a melléket tartalommal:

mymodule.info

name = mymodule
description = "Iframe: a CSS-t node/%/delete/iframe útvonalon lehet törölni."
package = mymodule
files[] = mymodule.module
core = 7.x
version = "7.x-0.1"
core = "7.x"
project = "mymodule"
datestamp = ""

mymodule.module (1:1 ben amit küldtél)

<?php
/**
* Implements hook_preprocess_page().
*
* Removes unneeded cruft from 'mycontenttype' node deletion form's page.
*/
function mymodule_preprocess_page(&$vars) {
  if ((arg(0) == 'node') && (arg(2) == 'delete') && ($vars['node']->type == 'mycontenttype') && (arg(3) == 'iframe')) {
    $vars['page']['sidebar_first'] = '';
    $vars['tabs']['#primary'] = array();
    drupal_add_css(drupal_get_path('module', 'mymodule') . '/mymodule.css');
  }
}
?>

mymodule.css

@charset "utf-8";
/* CSS Document */
 
body {
    background: #17293D;
}

Elvileg, ha most "node/%/delete/iframe" v. "node/%/iframe" útvonalra hivatkozok, akkor a háttérnek kék színűnek kellene hogy legyen? Ha jól értettem....

Ezzel szemben semmi nem történik egyik variációban sem.

Segítségedet előre is köszönöm!

KALMI

0
0
szantog képe

Ha elsőként a saját modulodat engedélyezted, majd ezt követően a Develt, akkor a module_load_all_includes() meghívásakor a saját modulod fájljai előbb include-olódhatnak

ami nem így van.

function module_list($refresh = FALSE, $bootstrap_refresh = FALSE, $sort = FALSE, $fixed_list = NULL) {}

Amit beidéztél, hogy

  1. if ($fixed_list) {
  2. foreach ($fixed_list as $name => $module) {

látható, hogy ez egy nem kötelező paraméter, a module_load_all_includes() pedig enélkül a paraméter nélkül hívja meg a module_list()-et. Ergo tovább kell nézni, melyik if ágből fog felépülni a $list, amivel visszatér a module_list.

Esetünkben ezzel:

  1. else {
  2. // Not using drupal_map_assoc() here as that requires common.inc.
  3. $list = array_keys(system_list('module_enabled'));
  4. $list = (!empty($list) ? array_combine($list, $list) : array());
  5. }

Szócal ami a module listát előállítja, az valójában a system_list().

Benne a kveri:
      $result = db_query("SELECT * FROM {system} WHERE type = 'theme' OR (type = 'module' AND status = 1) ORDER BY weight ASC, name ASC");

Ezért kezdtem így: „A modulok weight majd name szerint rendezve töltődnek be.”

a későbbi engedélyezés miatt (később került be a táblába)

A system táblába pedig nem module engedélyezése alapján bele dolgok, hanem fáljrendszer alapján. Kb itt lehet megfogni az egészet: http://api.drupal.org/api/drupal/modules%21system%21system.module/functi...

Vagyis amint egy module bekerül a fáljrendszerbe, és valamikor a system_rebuild_module_data() meghívódik, onnantől van a system táblában. Ez történik pl a admin/modules oldal betöltésekor.

1
0

----
Rájöttem, miért kérdezek olyan ritkán a drupal.hu-n. Amíg szedem össze az infokat a kérdéshez, mindig rájövök a megoldásra.