Page 1 of 11
Forum moderator: bigblog 
uCoz Community » For Webmasters » Custom Solutions » Informer visible on first page only
Informer visible on first page only
Soldierdevil
Posts: 122
Reputation: 0

Message # 1 | 7:39 AM
I want to display some photos using an informer on only the first page of the module main page. When user selects 'page2' the informer disappears. How can i do this?
I hate politics, people who do not make an effort with people and those who try hard to be cool
Paradox
Posts: 3276
Reputation: 145

Message # 2 | 8:15 AM
Soldierdevil,

Code
<?if($URI_ID$ = "page1")?>$MYINF_X$<?endif?>


Add that to your template where you'd like the Informer to appear. smile

Developer, Designer, Communicator.
Been here for 6 years and counting.
Visit me at alexmoloney.me.
Soldierdevil
Posts: 122
Reputation: 0

Message # 3 | 9:28 AM
Paradox, thank you but thing does not work, makes the informer disappear completely. I want the photo informer on the photo module main page. When the guest selects page 2 it does not show again.
I hate politics, people who do not make an effort with people and those who try hard to be cool
Paradox
Posts: 3276
Reputation: 145

Message # 4 | 10:58 AM
Soldierdevil, oh! Sorry, misread your initial post. surprised

Code
<?if($URI_ID$ = "phMain")?>$MYINF_X$<?endif?>


That will do the trick. cool

Developer, Designer, Communicator.
Been here for 6 years and counting.
Visit me at alexmoloney.me.
Soldierdevil
Posts: 122
Reputation: 0

Message # 5 | 3:44 PM
Paradox, i have failed to see any trick here. The informer will appear in page selectors even after applying that condition. Is it the same for all other modules like file catalog?
I hate politics, people who do not make an effort with people and those who try hard to be cool
SanTLee
Posts: 46
Reputation: 3

Message # 6 | 5:19 PM
Quote Soldierdevil ()
I want to display some photos using an informer on only the first page of the module main page. When user selects 'page2' the informer disappears. How can i do this?


Use this code
Code
<?if($REQUEST_URI$='/photo/?page2')?>
<?else?>$MYINF_X$<?endif?>

<?if(you_have)?> a <head>and<?if(you_have)?> a <body> you have to have
<div id="idea" class="extreme" > to be inventive </div><?endif?><?endif?>
Paradox
Posts: 3276
Reputation: 145

Message # 7 | 10:53 PM
Soldierdevil, after testing my code - I realise the issue you're running into. Unfortunately it comes down to the Lightbox/AJAX functionality. I was assuming there were page refreshes happening, not just AJAX calls, and due to that, there isn't a prebuilt approach you can take to implement this functionality with the current settings as far as I am aware.

You would need to write an ECMAScript or jQuery function to implement what you're describing. I'll move this thread to the Custom Solutions board so someone can reply if they have a solution.

Good luck. wink

Developer, Designer, Communicator.
Been here for 6 years and counting.
Visit me at alexmoloney.me.
Soldierdevil
Posts: 122
Reputation: 0

Message # 8 | 1:55 PM
Paradox, thank you for your help. I am really looking forward to see this work out or may be uCoz provides such a condition in the templates. SanTLee, the code works well, but only on the 2nd page. When the user goes to page 3 it will re appear but it might have been helpfull though
I hate politics, people who do not make an effort with people and those who try hard to be cool
SanTLee
Posts: 46
Reputation: 3

Message # 9 | 4:54 PM
Quote Soldierdevil ()
SanTLee, the code works well, but only on the 2nd page. When the user goes to page 3 it will re appear but it might have been helpfull though
cool

If you wanna apply the condition for all pages except the 1st page, Use

Code
<?ifnot($REQUEST_URI$='/photo/')?><?else?>$MYINF_X$<?endif?>

<?if(you_have)?> a <head>and<?if(you_have)?> a <body> you have to have
<div id="idea" class="extreme" > to be inventive </div><?endif?><?endif?>
Soldierdevil
Posts: 122
Reputation: 0

Message # 10 | 9:15 AM
Paradox, i think i have got what i have been looking for but thank you so much for your contribution. SanTLee, you are the best. The condition works perfect. Hope someone else will need this too in future but really for the last 5 years i have been using uCoz i had never seen or used such a condition <?ifnot($CODE$)?>. uCoz should teach us more about all conditions that exist in the system so we can achieve more and enjoy our experience here.
I hate politics, people who do not make an effort with people and those who try hard to be cool
Paradox
Posts: 3276
Reputation: 145

Message # 11 | 12:18 PM
Soldierdevil, it would appear I still have no idea as to what you were asking- so I'm glad SanTLee knew what you were talking about. Apologies for not being able to help with that one, I'm not as well versed with Albums as the other modules. wacko

As to the conditions, you can find info about the uCoz conditions and functions by clicking the [?] button next to them in the Control Panel. smile It's certainly a good idea though, so I might write up a thread here on the forums that provides a plain English version.

Developer, Designer, Communicator.
Been here for 6 years and counting.
Visit me at alexmoloney.me.
Soldierdevil
Posts: 122
Reputation: 0

Message # 12 | 8:35 AM
Paradox, have seen the conditions explanations in CP but the explanations are cumbersome. Not suitable for layman. SanTLee, I have used the condition in the photo album and file catalog and it worked well so how is it that it does not work in blog and news...just asking! because i wanted to use it there too.

Plus, is the infinity scroll possible in site news and blog?..like replacing the page switchers with load more or see more or even auto loading when a user is scrolling down the page.

I hate politics, people who do not make an effort with people and those who try hard to be cool
bigblog
*boops*
Posts: 1472
Reputation: 71

Message # 13 | 2:36 PM
Soldierdevil, check if you have replaced "/photo/" with the proper URL, corresponding to the module.

Quote Soldierdevil ()
Plus, is the infinity scroll possible in site news and blog?..like replacing the page switchers with load more or see more or even auto loading when a user is scrolling down the page.

I believe it is, but it requires high-level JavaScript knowledge.

hey i'm joe, please don't call me on my real name because you're gonna misspell or mispronounce it and it drives me nuts
Soldierdevil
Posts: 122
Reputation: 0

Message # 14 | 6:08 AM
Quote bigblog ()
check if you have replaced "/photo/" with the proper URL, corresponding to the module.


i replaced "/photo/" with "/blog/" and "/news/" respectively but condition will only make the informer disappear unlike in the file catalog where it works well.

bigblog, do you know of any script somewhere that can help me with infinity scroll?

I hate politics, people who do not make an effort with people and those who try hard to be cool
bigblog
*boops*
Posts: 1472
Reputation: 71

Message # 15 | 3:41 PM
Soldierdevil, can you remind me the URL of your website? And no, I don't know any script like the one you've described.
hey i'm joe, please don't call me on my real name because you're gonna misspell or mispronounce it and it drives me nuts
uCoz Community » For Webmasters » Custom Solutions » Informer visible on first page only
Page 1 of 11
Search: