News:

Wondering if this will always be free?  See why free is better.

Main Menu

MOD:use_online_today con apollo?

Started by lonas, March 17, 2006, 05:12:07 PM

Previous topic - Next topic

lonas

a ver si algien me puede ayudar,instale el mod user_online_today el cual me indica los usuarios activos de hoy.en el tema de default se ve sin problemas pero cuando pongo el apollo no hay forma me pasa igual con casi todos los mod pero para mi el mas importante sin duda es este que os hablo,por favor me podrias decir que devo de hacer y en donde,gracias y un saludo
mi foro esta en www.lonasdigital.net/foro y mi version es SMF 1.1 RC2
con el theme Apollo  agradeseria cualquier sugerencia y o ayuda

lonas

sabeis que es lo que debo de hacer?

EgAr

Debes hacer los cambios en el theme, "a mano"...


lonas

como en donde de que forma?perdona mi torpeza pero esque yo de estas cosas como que no.....  gracias colega por contestar

lonas

Quote from: EgAr on March 18, 2006, 03:32:50 PM
Debes hacer los cambios en el theme, "a mano"...



gracias pero como en que parte del theme y que es lo que cambio
sakudos

Pedi que me borren

Descargas el mod a tu pc...lo descomprimis y adentro tenes las instrucciones.
Esas instrucciones, por lo gral vienen para el theme default...hacelas a mano, en el theme que uses..

lonas

ya lo descarge lo descomprimi y ahora a parte de que todo esta en ingles no tengo ni idea de que hacer¿no hay nadie que ya lo tenga puesto en el theme apollo y me pase directamente los archivos.php?gracias es que soy tela de torpe je je je

lonas

algun buen samaritano que me ayude? 8)

[darksteel]

pero... abres el mod en tu pc los archivos que digan /Themes/default los cambias por /Themes/apollo, y eso hará los cambos en apollo envez del default.

darksteel-



Luis "[darksteel]" Alvarado.
Spanish Support
¿Qué es el repair_settings?
No doy soporte por PM, publica tu duda en el foro y tendras respuestas mas rapidas.
My forum:
www.caamboard.com

lonas

lo he abierto en el pc y vienen dos archivos uno es este:
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
   <id>Michael.PedersenAkaCarceri:UsersOnlineTodayMod</id>
   <version>1.0</version>
   <file name="$sourcedir/BoardIndex.php">
      <operation>
         <search position="before"><![CDATA[   $context['num_users_online'] = count($context['users_online']) + $context['num_users_hidden'];
]]></search>
         <add><![CDATA[
   // Load the users online today.
   $nowdate = @getdate(forum_time(false));
   $midnight = mktime(0, 0, 0, $nowdate['mon'], $nowdate['mday'], $nowdate['year']) - ($modSettings['time_offset'] * 3600);

   $s = strpos($user_info['time_format'], '%S') === false ? '' : ':%S';
   if (strpos($user_info['time_format'], '%H') === false && strpos($user_info['time_format'], '%T') === false)
      $time_fmt = '%I:%M' . $s . ' %p';
   else
      $time_fmt = '%H:%M' . $s;

   $result = db_query("
      SELECT
         mem.ID_MEMBER, mem.lastLogin, mem.realName, mem.memberName, mem.showOnline,
         mg.onlineColor, mg.ID_GROUP, mg.groupName
      FROM {$db_prefix}members AS mem
         LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP)) WHERE mem.lastLogin >= $midnight", __FILE__, __LINE__);

   $context['users_online_today'] = array();
   $context['list_users_online_today'] = array();

   while ($row = mysql_fetch_assoc($result))
   {
      $userday = strftime('%d', forum_time(true));
      $loginday = strftime('%d', forum_time(true, $row['lastLogin']));
      $yesterday = $userday == $loginday ? '' : $txt['uot_yesterday'];
   
      $lastLogin = $yesterday . strftime($time_fmt, forum_time(true, $row['lastLogin']));
      $title = (allowedTo('moderate_forum') || !empty($row['showOnline'])) ? ' title="' . $lastLogin . '"' : '';

      // Some basic color coding...
      if (!empty($row['onlineColor']))
         $link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '"' . $title . ' style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
      else
         $link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '"' . $title . '>' . $row['realName'] . '</a>';

      $is_buddy = in_array($row['ID_MEMBER'], $user_info['buddies']);
      if ($is_buddy)
      {
         $link = '<b>' . $link . '</b>';
      }

      $context['users_online_today'][$row['lastLogin'] . $row['memberName']] = array(
         'id' => $row['ID_MEMBER'],
         'username' => $row['memberName'],
         'name' => $row['realName'],
         'group' => $row['ID_GROUP'],
         'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
         'link' => $link,
         'is_buddy' => $is_buddy,
         'hidden' => empty($row['showOnline']),
      );

      $context['list_users_online_today'][$row['lastLogin'] . $row['memberName']] = (empty($row['showOnline']) && allowedTo('moderate_forum')) ? '<i>' . $link . '</i>' : $link;
   }
   mysql_free_result($result);

   krsort($context['users_online_today']);
   krsort($context['list_users_online_today']);

   $context['num_users_online_today'] = count($context['users_online_today']);]]>
         </add>
      </operation>
   </file>
   <file name="$sourcedir/Stats.php">
      <operation>
         <search position="before"><![CDATA[   $context['online_today'] = (int) $context['online_today'];
]]></search>
         <add><![CDATA[
   // Total members online today
   $frag = explode('-', strftime('%Y-%m-%d', time()));
   $midnight = forum_time(false, mktime(0, 0, 0, (int) $frag[1], (int) $frag[2], (int) $frag[0]));
   $result = db_query("
      SELECT
         COUNT(*)
      FROM {$db_prefix}members
         WHERE lastLogin >= $midnight", __FILE__, __LINE__);
   list ($context['total_users_online_today']) = mysql_fetch_row($result);]]>
         </add>
      </operation>
   </file>
   <file name="$themedir/BoardIndex.template.php">
      <operation>
         <search position="before"><![CDATA[                     ', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
                  </span>
               </td>
            </tr>';
]]></search>
         <add><![CDATA[
   // Users online today
   echo '
   <tr>
      <td class="titlebg" colspan="2">', $txt['uot_users_online_today_title'], '</td>
   </tr><tr>
      <td class="windowbg" width="20" valign="middle" align="center">
         <img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], ' ', $txt['uot_users_online_today_title'], '" border="0" />
      </td>
      <td class="windowbg2" width="100%">';

   echo '
         <div class="smalltext">';

   echo $context['num_users_online_today'], ' ', $context['num_users_online_today'] == 1 ? $txt['uot_user_online_today'] : $txt['uot_users_online_today'];

   // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
   if (!empty($context['users_online_today']))
      echo ':<br />', implode(', ', $context['list_users_online_today']);

   echo '
            <br />', $context['show_stats'] && !$settings['show_sp1_info'] ? '
            <a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
         </div>
      </td>
   </tr>';]]>
         </add>
      </operation>
   </file>
   <file name="$themedir/Stats.template.php">
      <operation>
         <search position="replace"><![CDATA[                     <td nowrap="nowrap">', $txt['users_online_today'], ':</td>
                     <td align="right">', $context['online_today'], '</td>';]]></search>
         <add><![CDATA[                     <td nowrap="nowrap">', $txt['users_online_today'], ':</td>
                     <td align="right">', $context['online_today'], '</td>
                  </tr><tr>
                     <td nowrap="nowrap">', $txt['uot_total_users_online_today'], ':</td>
                     <td align="right">', $context['total_users_online_today'], '</td>';]]>
         </add>
      </operation>
   </file>
   <file name="$languagedir/Modifications.english.php">
      <operation>
         <search position="end"></search>
         <add><![CDATA[$txt['uot_users_online_today_title']='Users Seen Today';
$txt['uot_user_online_today']='user seen today';
$txt['uot_users_online_today']='users seen today';
$txt['uot_total_users_online_today']='Users Seen Today';
$txt['uot_yesterday']='Yesterday at ';]]>
         </add>
      </operation>
   </file>
   <file name="$languagedir/Stats.english.php">
      <operation>
         <search position="replace"><![CDATA[$txt['users_online_today'] = 'Online Today';
$txt['num_hits'] = 'Total page views';
$txt['average_hits'] = 'Average page views per day';
]]></search>
         <add><![CDATA[$txt['users_online_today'] = 'Most Online Today';
$txt['num_hits'] = 'Total page views';
$txt['average_hits'] = 'Average page views per day';]]>
         </add>
      </operation>
   </file>
</modification>





y el otro es este:
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
        <id>Michael.PedersenAkaCarceri:UsersOnlineTodayMod</id>
     <name>Users Online Today Mod</name>
     <version>1.3.1</version>
     <type>modification</type>
     <install>
       
                <readme type="inline">Users Online Today Mod (ver. 1.3.1).</readme>
                <modification>Users_Online_Today_Mod.xml</modification>               
        </install>
        <uninstall>
                <readme type="inline">Thanks for trying this mod</readme>
                <modification reverse="true">Users_Online_Today_Mod.xml</modification>
</uninstall>
</package-info>


pero no viene nada de defaull,por otro lado copie los archivos php de default y los pegue en el apollo pero todo sigue igual

[darksteel]

ese mod está configurado a que edite el theme que estas usando...



Luis "[darksteel]" Alvarado.
Spanish Support
¿Qué es el repair_settings?
No doy soporte por PM, publica tu duda en el foro y tendras respuestas mas rapidas.
My forum:
www.caamboard.com

lonas


Pedi que me borren

El sitio no se llega a ver, pero fijate si al colocarlo en ingles aparece la modificacion.
Si aparece, descarga el tema de traducciones de mod de Darkstell, la traduccion del mod.

opcion 2: pone el theme default y fijate si con se theme se llega a ver, puede ser que el theme que tenes, no tenga los archivos a modificar...y cree algun conflicto.

lonas

mira todo eso ya lo hize y nada creo que sera que tiene algun conflicto por que la mitad de los archivos que modifica el mod no los trae este theme

Pedi que me borren

Fijate los archivos que modifica del theme default...descargatelos a tu pc y subilos a la carpeta del theme que estas usando. (solo los que te faltan)

lonas

copie todos los aechivos del theme default y los pegue en el apollo y este es el resultado www.lonasdigital.net/foro  me a sorprendido lo wapo que a quedado y no solo esta wapo sino que me funcionan todos los mod ja ja ja ja muchisimas gracias colegas soys unos crack

lonas

weno amigos una ultima pregunta para rematar ya el foro.¿como puedo poner de fondo el color azul del logo o el naranja?y ¿que ago para que las preguntas que posteen los user salgan en otro color?saludos

[darksteel]




Luis "[darksteel]" Alvarado.
Spanish Support
¿Qué es el repair_settings?
No doy soporte por PM, publica tu duda en el foro y tendras respuestas mas rapidas.
My forum:
www.caamboard.com

lonas

el caso esque ya me lei el manual pero no se o no me atrevo a tocarlo no valla a meter la pata mi style.css es este :
-----------------------------------------------------------------------------
/* Normal, standard links. */
a:link
{
   color: #476C8E;
   text-decoration: none;
}
a:visited
{
   color: #476C8E;
   text-decoration: none;
}
a:hover
{
   text-decoration: underline;
}

/* Navigation links - for the link tree. */
.nav, .nav:link, .nav:visited
{
   color: #000000;
   text-decoration: none;
}
a.nav:hover
{
   color: #cc3333;
   text-decoration: underline;
}

/* Tables should show empty cells. */
table
{
   empty-cells: show;
}

/* By default (td, body..) use verdana in black. */
body, td, th , tr
{
   color: #000000;
   font-size: small;
   font-family: verdana, sans-serif;
}

/* The main body of the entire forum. */
body
{
   background-color: #E5E5E8;
   margin: 0px;
   padding: 12px 30px 4px 30px;
}

/* Input boxes - just a bit smaller than normal so they align well. */
input, textarea, button
{
   color: #000000;
   font-family: verdana, sans-serif;
}
input, button
{
   font-size: 90%;
}

textarea
{
   font-size: 100%;
   color: #000000;
   font-family: verdana, sans-serif;
}

/* All input elements that are checkboxes or radio buttons. */
input.check
{
}

/* Selects are a bit smaller, because it makes them look even better 8). */
select
{
   font-size: 90%;
   font-weight: normal;
   color: #000000;
   font-family: verdana, sans-serif;
}

/* Standard horizontal rule.. (
, etc.) */
hr, .hrcolor
{
   height: 1px;
   border: 0;
   color: #666666;
   background-color: #666666;
}

/* No image should have a border when linked */
a img{
border: 0;
}
/* A quote, perhaps from another post. */
.quote
{
   color: #000000;
   background-color: #D7DAEC;
   border: 1px solid #000000;
   margin: 1px;
   padding: 1px;
   font-size: x-small;
   line-height: 1.4em;
}

/* A code block - maybe even PHP ;). */
.code
{
   color: #000000;
   background-color: #dddddd;
   font-family: "courier new", "times new roman", monospace;
   font-size: x-small;
   line-height: 1.3em;
   /* Put a nice border around it. */
   border: 1px solid #000000;
   margin: 1px auto 1px auto;
   padding: 1px;
   width: 99%;
   /* Don't wrap its contents, and show scrollbars. */
   white-space: nowrap;
   overflow: auto;
   /* Stop after about 24 lines, and just show a scrollbar. */
   max-height: 24em;
}

/* The "Quote:" and "Code:" header parts... */
.quoteheader, .codeheader
{
   color: #000000;
   text-decoration: none;
   font-style: normal;
   font-weight: bold;
   font-size: x-small;
   line-height: 1.2em;
}

/* Generally, those [?] icons.  This makes your cursor a help icon. */
.help
{
   cursor: help;
}

/* /me uses this a lot. (emote, try typing /me in a post.) */
.meaction
{
   color: red;
}

/* The main post box - this makes it as wide as possible. */
.editor
{
   width: 96%;
}

/* Highlighted text - such as search results. */
.highlight
{
   background-color: yellow;
   font-weight: bold;
   color: black;
}

/* Alternating backgrounds for posts, and several other sections of the forum. */
.windowbg
{
   color: #000000;
   background-color: #ECEDF3;
}
.windowbg2
{
   color: #000000;
   background-color: #F6F6F6;
}
.windowbg3
{
   color: #000000;
   background-color: #E0E1E8;
}
/* the today container in calendar */
.calendar_today
{
   background-color: #FFFFFF;
}

/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */
.titlebg, tr.titlebg th, tr.titlebg td, .titlebg2, tr.titlebg2 th, tr.titlebg2 td
{
   color: black;
   font-style: normal;
   background-color: #E9F0F6;
   background-image: url(images/titlebg.jpg);
   border-bottom: solid 1px #9BAEBF;
   border-top: solid 1px #FFFFFF;
   background-repeat: repeat-x;
   padding-left: 10px;
   padding-right: 10px;
}
.titlebg, .titlebg a:link, .titlebg a:visited
{
   font-weight: bold;
   color: black;
   font-style: normal;
}

.titlebg a:hover
{
   color: #404040;
}
/* same as titlebg, but used where bold text is not needed */
.titlebg2 a:link, .titlebg2 a:visited
{
   color: black;
   font-style: normal;
   text-decoration: underline;
}

.titlebg2 a:hover
{
   text-decoration: underline;
}

/* This is used for categories, page indexes, and several other areas in the forum.
.catbg and .catbg2 is for boardindex, while .catbg3 is for messageindex and display headers*/
.catbg , tr.catbg td , .catbg3 , tr.catbg3 td
{
   background-image: url(images/catbg.jpg);
   background-color: #88A6C0;
   color: #ffffff;
   padding-left: 10px;
   padding-right: 10px;
}
.catbg2 , tr.catbg2 td
{
   background-image: url(images/catbg2.jpg);
   background-color: #A1BFD9;
   color: #ffffff;
   padding-left: 10px;
   padding-right: 10px;
}
.catbg, .catbg2, .catbg3
{
   border-bottom: solid 1px #375576;
   background-repeat: repeat-x;
}
.catbg, .catbg2
{
   font-weight: bold;
}
.catbg3, tr.catbg3 td, .catbg3 a:link, .catbg3 a:visited
{
   font-size: 95%;
   color: white;
   text-decoration: none;
}
.catbg a:link, .catbg a:visited , .catbg2 a:link, .catbg2 a:visited
{
   color: white;
   text-decoration: none;
}
.catbg a:hover, .catbg2 a:hover, .catbg3 a:hover
{
   color: #e0e0ff;
}
/* This is used for tables that have a grid/border background color (such as the topic listing.) */
.bordercolor
{
   background-color: #ADADAD;
   padding: 0px;
}

/* This is used on tables that should just have a border around them. */
.tborder
{
   padding: 1px;
   border: 1px solid #696969;
   background-color: #FFFFFF;
}

/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext
{
   font-size: x-small;
   font-family: verdana, sans-serif;
}
.middletext
{
   font-size: 90%;
}
.normaltext
{
   font-size: small;
}
.largetext
{
   font-size: large;
}


/* Posts and personal messages displayed throughout the forum. */
.post, .personalmessage
{
   width: 100%;
   overflow: auto;
   line-height: 1.3em;
}

/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature
{
   width: 100%;
   overflow: auto;
   padding-bottom: 3px;
   line-height: 1.3em;
}

/* Sometimes there will be an error when you post */
.error{
color: red;
}


/* definitions for the main tab, active means the tab reflects which page is displayed */
.maintab_first, .maintab_back, .maintab_last, .maintab_active_first, .maintab_active_back, .maintab_active_last
{
   background-position: left bottom;
   color: white;
   text-transform: uppercase;
   vertical-align: top;

}
.maintab_back, .maintab_active_back
{
   color: white;
   text-decoration: none;
   font-size:  9px;
   vertical-align: top;
   padding: 2px 6px 6px 6px;
   font-family: tahoma, sans-serif;
}

.maintab_first
{
   background-image: url(images/maintab_first.gif);
   background-repeat: no-repeat;
   width: 10px;
}
.maintab_back
{
   background-image: url(images/maintab_back.gif);
   background-repeat: repeat-x;
}
.maintab_last
{
   background-image: url(images/maintab_last.gif);
   background-repeat: no-repeat;
   width: 8px;
}
.maintab_active_first
{
   background-image: url(images/maintab_active_first.gif);
   background-repeat: no-repeat;
   width: 6px;
}
.maintab_active_back
{
   background-image: url(images/maintab_active_back.gif);
   background-repeat: repeat-x;
}
.maintab_active_last
{
   background-image: url(images/maintab_active_last.gif);
   background-repeat: no-repeat;
   width: 8px;
}

/* how links behave in main tab. */
.maintab_back a:link , .maintab_back a:visited, .maintab_active_back a:link , .maintab_active_back a:visited
{
   color: white;
   text-decoration: none;
}

.maintab_back a:hover, .maintab_active_back a:hover
{
   color: #e0e0ff;
   text-decoration: none;
}
/* definitions for the mirror tab */
.mirrortab_first, .mirrortab_back, .mirrortab_last, .mirrortab_active_first, .mirrortab_active_back, .mirrortab_active_last
{
   background-position: left top;
   color: white;
   text-transform: uppercase;
   vertical-align: top;

}
.mirrortab_back, .mirrortab_active_back
{
   color: white;
   text-decoration: none;
   font-size: 9px;
   vertical-align: bottom;
   padding: 6px 6px 2px 6px;
   font-family: tahoma, sans-serif;
}

.mirrortab_first
{
   background-image: url(images/mirrortab_first.gif);
   background-repeat: no-repeat;
   width: 10px;
}
.mirrortab_back
{
   background-image: url(images/mirrortab_back.gif);
   background-repeat: repeat-x;
}
.mirrortab_last
{
   background-image: url(images/mirrortab_last.gif);
   background-repeat: no-repeat;
   width: 6px;
}
.mirrortab_active_first
{
   background-image: url(images/mirrortab_active_first.gif);
   background-repeat: no-repeat;
   width: 6px;
}
.mirrortab_active_back
{
   background-image: url(images/mirrortab_active_back.gif);
   background-repeat: repeat-x;
}
.mirrortab_active_last
{
   background-image: url(images/mirrortab_active_last.gif);
   background-repeat: no-repeat;
   width: 8px;
}

/* how links behave in mirror tab. */
.mirrortab_back a:link , .mirrortab_back a:visited, .mirrortab_active_back a:link , .mirrortab_active_back a:visited
{
   color: white;
   text-decoration: none;
}

.mirrortab_back a:hover, .mirrortab_active_back a:hover
{
   color: #e0e0ff;
   text-decoration: none;
}
-----------------------------------------------------------------------------

y me gustaria poner todo lo que sea el fondo en azul o naranja igual que el logo,pero por mucho que miro y toco no se si saldra bien,por otro lado ya lo intente hace tiempo y lo unico que consegui fue aplicar copia de seguridad

Pedi que me borren

Dejate guardado en algun lugar el style.css original...y despues podes ir haciendo las modificaciones..si te tira algun error serio, volves a subir el original...
Parte del fondo esta aca:
/* The main body of the entire forum. */
body
{
   background-color: #E5E5E8;
   margin: 0px;
   padding: 12px 30px 4px 30px;


Abri el codigo fuente...y buscas ahi, que sentencia corresponde a cada modificacion que queres hacer...una vez que sabes cual es...la buscas en el style.css...la modificas...y listo.

Advertisement: