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.
Pages: 1
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
inc/functions.php
Look for the 'loadFavouriteSites()' function. You`ll see the links, just add a target.
Offline
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
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
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
$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";
Offline
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 ![]()
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
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?
Offline
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
Superb, glad it worked. Yes, I`ve had that issue with cpanel myself.
Offline
David,
Why are there two '$sites' variables?
Offline
One has <li> tags, one doesn`t. Its for some of the themes I think.
Offline
Ok. Good to know.
Offline
No problem. Happy New Year duc. ![]()
Offline
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
bump. ![]()
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
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.
Offline
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
lol. I read them, then forget. Ok, well you want to email me when you are back home?
Offline
Ok. Will do.
Offline
Pages: 1