Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1
    Join Date
    Nov 2005
    Posts
    4,486
    Tokens
    921

    Latest Awards:

    Default Cutenews and AJAX - +REP

    Here's the thing..
    I have been using cutenews with my site for ages. Recently, I have switched from iFrames to AJAX - Javascript.
    This is where the problem is, cutenews will no-longer open the full story in the AJAX div, so I am screwed.

    I posted a thread in the coding community and Invent replied telling me that I had to change some things in 'shows.inc.php'.
    I have tried and failed as I am not the best with PHP and javascript.

    I need someone who knows about AJAX and cutenews / php, to maybe write a tutorial for me on how to do it, or.. Do it for me.
    Invent wrote the below which is an breif idea on what to do;

    Originally posted by Invent;
    'To fix that you need to change your shows.inc.php file so that all the links run the javascript function instead of loading a page.
    If you can't do this yourself, I'll do it for you when I get a chance'

    But Invent hasn't had the time and I am just lost / newbie.

    Any help guys?
    +REP to all help / answers.

    Last edited by Jahova; 05-07-2008 at 08:59 PM.
    "RETIRED" FROM HABBO(X)

    :¬:

    TOMSPIT / COWLY05


  2. #2
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Ajax and iframes don't work the same lol, how are you opening the link using ajax?
    Hi, names James. I am a web developer.

  3. #3
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Try:

    PHP Code:
    $output str_replace("[link]","<a href=\"$PHP_SELF?subaction=showfull&amp;id=$news_arr[0]&amp;archive=$archive&amp;start_from=$my_start_from&amp;ucat=$news_arr[6]&amp;$user_query\">"$output); 
    change that line to this:


    PHP Code:
    $output str_replace("[link]","<a onclick=\"javascript:ajaxpage('$PHP_SELF?subaction=showfull&amp;id=$news_arr[0]&amp;archive=$archive&amp;start_from=$my_start_from&amp;ucat=$news_arr[6]&amp;$user_query', 'content');/">", $output); 

  4. #4
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Slightly off topic I know and sorry for that. But it will help us all in the long run.

    PLEASE STOP centering your writing. Just leave it default, I never reply to your posts because it looks like alot of effort to read it. Thats all


    www.fragme.co = a project.

  5. #5
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    Why are you posting in this forum?

  6. #6
    Join Date
    Aug 2006
    Location
    Manchester, UK
    Posts
    2,016
    Tokens
    141
    Habbo
    florx

    Latest Awards:

    Default

    Quote Originally Posted by GasFMatt View Post
    Slightly off topic I know and sorry for that. But it will help us all in the long run.

    PLEASE STOP centering your writing. Just leave it default, I never reply to your posts because it looks like alot of effort to read it. Thats all
    Your opinion. He can do what he wants, the CENTER function is there for a reason...

    TO BE USED. I always BOLD my text, so it's easier for me to know when I have posted when I read a thread again.

  7. #7
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    I can see where hes coming from, I dont mind the center its just the small font, I have to make it bigger - its hard to read on my screen lols.
    Hi, names James. I am a web developer.

  8. #8
    Join Date
    May 2008
    Posts
    910
    Tokens
    0

    Default

    Quote Originally Posted by GasFMatt View Post
    Slightly off topic I know and sorry for that. But it will help us all in the long run.

    PLEASE STOP centering your writing. Just leave it default, I never reply to your posts because it looks like alot of effort to read it. Thats all

    :rolleyes: Dude, what's the point?

  9. #9
    Join Date
    Nov 2005
    Posts
    4,486
    Tokens
    921

    Latest Awards:

    Default

    Guys can you please stay on-topic as this thread is for my problem only, discuss your differences outside of this thread.

    @ JackBoy - Who is the only one to help ATM.
    I have changed it and it shoves an error in my face;
    'Parse error: syntax error, unexpected '[' in /home/cowly/public_html/news/inc/shows.inc.php on line 692'

    So it seems to have ruined the line below :S

    Also, any other forum members willing to help?
    "RETIRED" FROM HABBO(X)

    :¬:

    TOMSPIT / COWLY05


  10. #10
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Sorry didn't spend enough time doing it properly..

    Change that same line to:

    PHP Code:
    $output str_replace("[link]","<a onclick=javascript:ajaxpage('$PHP_SELF?subaction=showfull&amp;id=$news_arr[0]&amp;archive=$archive&amp;start_from=$my_start_from&amp;ucat=$news_arr[6]&amp;$user_query', 'content');>"$output); 
    Last edited by Jackboy; 06-07-2008 at 12:05 PM.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •