Maian Script World on Facebook Maian Script World on Twitter Maian Script World - Latest News Maian Script World on YouTube Maian Script World on LinkedIn


Please Read

You are required to register before you can post. This is via a custom verification system. Please post any problems you are encountering here and I`ll do my best to respond as soon as I can. Please note that a reply WILL be posted to all queries, so do not double post. There are no guarantees when a reply will appear but I do my best to answer all within 3/4 days max. Bumping topics won`t make the slightest difference.

IMPORTANT: Posts in English ONLY please, thank you! Any other languages will be ignored and your message deleted.
SEARCH: Use the search option to see if your question has been answered on the forum before. Or check the relevant script docs.
CUSTOMER: If you have purchased a commercial version of any of my software, using the contact option at the licence centre ensures a faster response.
AUTO DELETION: Accounts older than 5 days, with no posts or topics, are automatically deleted. Only register if you are thinking of posting.
PRIVATE MESSAGES: Private messages are currently disabled.
LINKS: Any links posted are 'NOFOLLOW' and will not be picked up by search engines.

You are not logged in.

#1 08-01-2012 02:14:46

Klauwaart
Members
From: United Kingdom (Great Britain)
Registered: 22-10-2007
Posts: 184

Target of favourite sites

A simple question:

Is it possible to let your favourite sites open in a new window (now they open in the same window).

If yes, how is it done?

Thanks.

Offline

#2 08-01-2012 19:34:39

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,062

Re: Target of favourite sites

inc/functions.php

Look for the 'loadFavouriteSites()' function. You`ll see the links, just add a target.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#3 08-01-2012 19:42:15

Klauwaart
Members
From: United Kingdom (Great Britain)
Registered: 22-10-2007
Posts: 184

Re: Target of favourite sites

Thanks.
However, I see the links etc., but full of hyphens followed by quotes, and I wonder where exactly to slot in the target="_blank".

A you know, i am a bit PHP phobic, so, where exactly do I put that into the following:


"// Are there favourites to display?
  $q_faves = mysql_query("SELECT * FROM ".$database['prefix']."favourites ORDER BY name") or die(mysql_error());

  if (mysql_num_rows($q_faves)>0)
  {
    while ($FAVES = mysql_fetch_object($q_faves))
    {
      $sites .= '- <a href="'.$FAVES->url.'" title="'.htmlspecialchars(cleanData($FAVES->name)).'">'.cleanData($FAVES->name).'</a><br />'."\n";
      $sites2 .= '<li><a href="'.$FAVES->url.'" title="'.htmlspecialchars(cleanData($FAVES->name)).'">'.cleanData($FAVES->name).'</a></li>'."\n";
    }
 
    $find     = array('{favourites}','{favourites_list}','{favourites_list_li}','{path}');
    $replace  = array($msg_public_header13,$sites,$sites2,$SETTINGS->w_path.'/themes/'.THEME);
    $faves    = str_replace($find,$replace,file_get_contents(FOLDER_PATH.'themes/'.THEME.'/tpl_files/favourites.tpl'));
  }
 
  return $faves;
}"

Thank you.

Last edited by Klauwaart (08-01-2012 19:42:33)

Offline

#4 09-01-2012 02:24:58

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Target of favourite sites

I believe you add this line to the following.

target="_blank"

$sites .= '- <a href="'.$FAVES->url.'" title="'.htmlspecialchars(cleanData($FAVES->name)).'">'.cleanData($FAVES->name).'</a><br />'."\n";
$sites2 .= '<li><a href="'.$FAVES->url.'" title="'.htmlspecialchars(cleanData($FAVES->name)).'">'.cleanData($FAVES->name).'</a></li>'."\n";

Offline

#5 09-01-2012 02:41:09

Klauwaart
Members
From: United Kingdom (Great Britain)
Registered: 22-10-2007
Posts: 184

Re: Target of favourite sites

OK, thanks.

I know the target code, but I am wondering where exactly in the lines of code I have to put it.
Especially with all the apostrophies and quotes in there, they confuse me incredibly.

Last edited by Klauwaart (09-01-2012 02:41:33)

Offline

#6 09-01-2012 08:27:18

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,062

Re: Target of favourite sites

$sites .= '- <a target="_blank" href="'.$FAVES->url.'" title="'.htmlspecialchars(cleanData($FAVES->name)).'">'.cleanData($FAVES->name).'</a><br />'."\n";
      $sites2 .= '<li><a target="_blank" href="'.$FAVES->url.'" title="'.htmlspecialchars(cleanData($FAVES->name)).'">'.cleanData($FAVES->name).'</a></li>'."\n";


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#7 09-01-2012 11:35:52

Klauwaart
Members
From: United Kingdom (Great Britain)
Registered: 22-10-2007
Posts: 184

Re: Target of favourite sites

OK,
I did that, and when going to the blog page, I was greeted with a blank page. (no error messages, nothing).

Changed it back to the original code, same thing now, blank page sad

Even the admin page cannot be accessed anymore.

I then copied and pasted the whole original functions.php file, and the blog came back to life.

Where could I have gone wrong?

Thank you.

Last edited by Klauwaart (09-01-2012 11:41:45)

Offline

#8 09-01-2012 15:35:19

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,062

Re: Target of favourite sites

It could be that when you saved the functions file it saved with whitespace at the bottom of the file?

Check there is no whitespace before or after the opening/closing php tags. How are you editing the file?


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#9 09-01-2012 15:51:49

Klauwaart
Members
From: United Kingdom (Great Britain)
Registered: 22-10-2007
Posts: 184

Re: Target of favourite sites

Thanks,
Brilliant.

i had edited it in my Cpanel's File Manager Edit function.

After your advice, I edited the file with CoffeeCup HTML Editor and uploaded it.
Problem gone!
The sites now open in a new window.

I just LOVE my blog section.

If you ever intend to update it, I have some suggestions.

Offline

#10 10-01-2012 20:56:36

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,062

Re: Target of favourite sites

Superb, glad it worked. Yes, I`ve had that issue with cpanel myself.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#11 11-01-2012 14:18:10

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Target of favourite sites

David,

Why are there two '$sites' variables?

Offline

#12 11-01-2012 15:07:49

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,062

Re: Target of favourite sites

One has <li> tags, one doesn`t. Its for some of the themes I think.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#13 11-01-2012 15:10:31

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Target of favourite sites

Ok. Good to know.

Offline

#14 11-01-2012 15:11:26

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,062

Re: Target of favourite sites

No problem. Happy New Year duc. smile


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#15 11-01-2012 15:17:00

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Target of favourite sites

Happy New Year David.

I still need your assistance to my other issue. I still can't figure out what it is not working proper. If you have the time, please like me know. I'm on vacation at the moment.

Btw, I hope you didn't start the beta test on support script yet. I still want in.

Offline

#16 23-01-2012 15:23:47

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Target of favourite sites

bump. big_smile

duceduc wrote:

Happy New Year David.

I still need your assistance to my other issue. I still can't figure out what it is not working proper. If you have the time, please like me know. I'm on vacation at the moment.

Btw, I hope you didn't start the beta test on support script yet. I still want in.

Offline

#17 23-01-2012 17:02:43

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,062

Re: Target of favourite sites

Hi Duc,

Where are you on vacation? Still in Japan? Feel free to email when you have time. The beta for Maian Support v2.1 will be ready this weekend, so I`ll let you know when its ready. Thanks for your help as always.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#18 23-01-2012 17:11:50

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Target of favourite sites

This is not the first time you miss my post. Hehe. I am in the states on vacation(family) but am returning to Japan by the end of this month.

Offline

#19 23-01-2012 18:48:50

msworld
Administrator
From: United Kingdom (Great Britain)
Registered: 09-05-2006
Posts: 7,062

Re: Target of favourite sites

lol. I read them, then forget. Ok, well you want to email me when you are back home?


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
David Ian Bennett - Lead Developer
www.maianscriptworld.co.uk

Offline

#20 23-01-2012 18:50:21

duceduc
Members
From: Japan
Registered: 25-05-2010
Posts: 359

Re: Target of favourite sites

Ok. Will do.

Offline

Board footer

2Checkout.com is an authorized reseller of goods and services provided by Maian Script World.© 2003-2013 David Ian Bennett. All Rights Reserved | Forum: FluxBB

Privacy Policy | Refund Policy