Theme alterations made in RC2

Started by Grudge, November 23, 2005, 05:58:36 PM

Previous topic - Next topic

Owdy

Quote from: † ÐëepÇuT¹ † on December 31, 2005, 03:18:02 PM
How can I include the inline edit feature into a theme? I've tried pasting this at the right spot in my themes MessageIndex.template.php..
Inline edit feature is in Display.template.php
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

† ÐëepÇuT¹ †

Quote from: Owdy on December 31, 2005, 06:56:47 PM
Quote from: † ÐëepÇuT¹ † on December 31, 2005, 03:18:02 PM
How can I include the inline edit feature into a theme? I've tried pasting this at the right spot in my themes MessageIndex.template.php..
Inline edit feature is in Display.template.php

Its hard to find it.. I've looked hard. When I tried copy'n'pasting the entire code of the lower area which I think contains the inline edit, it removes my boards images that it has on the bottom and top of the tables.. can anyone help me? Btw I'm using a theme which is simmilar to ElemenT by Diplomat..



Personal Website
x3Generation - gaming
graphics and anime.
 

Favorite Forums
> SimpleMachines Forum
> GamerzPlanet Forums


Owdy

Search part where is modify_inline.gif
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Grudge

Tarrantino,

It seems like maybe your templates are out of date? The index template should have a call to hashLoginPassword in it? If it calls hashPassword, this probably needs to be changed to hashLoginPassword. How old is your template (What version is it from)?
I'm only a half geek really...

TarantinoArchives

Quote from: Grudge on January 01, 2006, 06:26:40 AM
Tarrantino,

It seems like maybe your templates are out of date? The index template should have a call to hashLoginPassword in it? If it calls hashPassword, this probably needs to be changed to hashLoginPassword. How old is your template (What version is it from)?

it's an alteration (colors mainly) of the default template, which might be originated from a Release Candidate or SMF....

but i'll change to a newer template this week anyway. at least it works :_)

shen brood

Quote from: Grudge on November 23, 2005, 05:58:36 PM
smf_setThemeOption
This javascript function is often used in the index template for doing the upshrink. As of RC2 it requires an extra parameter for security, the session id. To add this simply find your current smf_setThemeOption calls, and add "' . $context['session_id'] . '" on the end. For example, if you had this:


smf_setThemeOption("collapse_header", mode ? 1 : 0);


It needs to become this:

smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "' . $context['session_id'] . '")';


Note that if, as the above example shows, you don't use the optional third parameter, set it to null as above.

hash password
The other major change, is to the function called hashLoginPassword. Again, this now needs the session ID passed to it. To do so simply find any calls to hashLoginPassword and replace it with that shown below. So if you had:


hashLoginPassword(this);


It needs to become:

hashLoginPassword(this, \'' . $context['session_id'] . '\');


These should be the only javascript problems likely to be encountered on the average custom theme.

Note that there will be no other template changes between now and final - so you don't have to worry about doing this more than once!

EDIT: Added ' to this smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "' . $context['session_id'] . '")';

What file will I edit to effect this changes?  Also I noticed in SMFOne theme that all BB Codes including smilies had been boxed and other gifs as well which does not look that good.. how can this be corrected?

farik

After updating to RC2 half of buttons with borders in my theme. Where it is necessary to correct?


peterstannard

Quote from: shen brood on January 01, 2006, 07:33:36 AM
Quote from: Grudge on November 23, 2005, 05:58:36 PM
smf_setThemeOption
This javascript function is often used in the index template for doing the upshrink. As of RC2 it requires an extra parameter for security, the session id. To add this simply find your current smf_setThemeOption calls, and add "' . $context['session_id'] . '" on the end. For example, if you had this:


smf_setThemeOption("collapse_header", mode ? 1 : 0);


It needs to become this:

smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "' . $context['session_id'] . '")';


Note that if, as the above example shows, you don't use the optional third parameter, set it to null as above.

hash password
The other major change, is to the function called hashLoginPassword. Again, this now needs the session ID passed to it. To do so simply find any calls to hashLoginPassword and replace it with that shown below. So if you had:


hashLoginPassword(this);


It needs to become:

hashLoginPassword(this, \'' . $context['session_id'] . '\');


These should be the only javascript problems likely to be encountered on the average custom theme.

Note that there will be no other template changes between now and final - so you don't have to worry about doing this more than once!

EDIT: Added ' to this smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "' . $context['session_id'] . '")';

What file will I edit to effect this changes?  Also I noticed in SMFOne theme that all BB Codes including smilies had been boxed and other gifs as well which does not look that good.. how can this be corrected?

I have released a CSS update for Smfone which will remove the borders. Look in the Smfone thread.

Grudge

farik,

In the style.css file in that theme add:

/* No image should have a border when linked */
a img{
border: 0;
}


to the bottom. You may need to hit F5 after making the change to refresh your cache.
I'm only a half geek really...

farik

to Grudge

Yes, thanks, I have already understood ... I still sleep  ;D

shen brood

Thanks for the fix... have already used it and it all works fine now :)  :-*

Tye

Ok wheres the Hash Password located?


Matt McFarland

there is no hashpassword line at all in safblue


peterstannard

Quote from: Matt McFarland on January 02, 2006, 02:22:37 PM
there is no hashpassword line at all in safblue



The way I read it some themes may not have the last two codes in, as they instead use different code.

EG

Quote from: Grudge on January 01, 2006, 08:28:06 AM
farik,

In the style.css file in that theme add:

/* No image should have a border when linked */
a img{
border: 0;
}


to the bottom. You may need to hit F5 after making the change to refresh your cache.

HURRAYYY!!!  was getting fed up looking for the images to fix them!

thanks Grudge!

dvd-man

I don't see any hashLoginPassword(this); either.... the theme I am using stated it supported 1.1 RC1.

Btw... I'm not seeing any of the new features such as qucik edit without reloading for example..

3guk

How are we themers meant to keep up when you do not provide all the changed code?

Many people modify more than the index.template.php and yet you do not provide updated code for anything else ?

At the moment I can not get to features / settings because my template is out of date, I have no way of updating the template as I do not know what code has changed where?

Come on guys, you need to provide us with more than this.

Could you tell me where the other theme edits need to be made ?

EG

#38
Id say all the files that were changed in the default theme need changing :-\

index.template.php
boardindex.template.php
messageindex.template.php
displaytemplate.php
post.template.php
instantmessage.template.php


being the obvious ones, unless that is they can use the default theme for some of those files.  All depends I guess in whether you edited them to create a theme




on another note, I am also having trouble finding the hashpassword and smf_setthemeOption in my themes.  My themes work with 1.05  and sadly for me, I have 12 to update.

I also dont want to create a button strip/bar thing for them all, rather just add the necessary extra buttons..  is it essential the button strip/bar thing is created ?

[edit]  Found the hashpassword thingy
Quote// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
   else
   {
      echo '
                        <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>

                        <form action="', $scripturl, '?action=login2" method="post" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
                           <input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
                           <select name="cookielength">
                              <option value="60">', $txt['smf53'], '</option>
                              <option value="1440">', $txt['smf47'], '</option>
                              <option value="10080">', $txt['smf48'], '</option>
                              <option value="302400">', $txt['smf49'], '</option>
                              <option value="-1" selected="selected">', $txt['smf50'], '</option>
                           </select>
                           <input type="submit" value="', $txt[34], '" /><br />
                           <span class="middletext">', $txt['smf52'], '</span>
                           <input type="hidden" name="hash_passwrd" value="" />
                        </form>';
   }
   echo '
                  </td></tr></table>
               </div>';
   echo '
                     </td>
            <td width="262" style="padding-left: 5px;" valign="top">';
in the indextemplate.php

i ahve just copied this section from the default theme to the relevant section on my new theme.. i assume thats ok?  and ive copied the entire <head> section (coz it includes that smf_setthemeOption thing) to my old theme too...... now to see if it all works!

EG

sorry for the double posting..

but one thing I have found, simply by copying the <head> from the default theme into my old theme, as well as the guest script I quoted and the buttonstrip thing that Grudge quoted in his first post...

the "inline editing" just works!  I havent had to edit any more files, and only had to add the icon

Advertisement: