Jump to content

zitu4life

Recommended Posts

Hello there

I was looking to take more advantages of WHMCS integrated Announcements.

So what i have done so far:

Create announcements on Support>Announcements

And it will be displayed like this on client area

image.png.4c351a9a9b6e3be42a3e09c641a67da0.png

I would like to change it to have a picture inserted there to look like this, I have used windows paint to edit it.

image.thumb.png.d2449fc4b13884ecea9115db74b0ca81.png

image.thumb.png.28d5c03086e086f75763396f7753f3d4.png

That idea could be done? editing TPL with a some customization? Where should i looking for to start!!!!

If we insert picture when editing on admin side it will make picture on body text, not like I have posted above.

image.thumb.png.c2ddb44f047a7f1cb7ad51102baeca9d.png

Thanks for for help!

 

Edited by zitu4life
Link to comment
Share on other sites

Appreciate that @brian!

But if I want for example to keep one renouncement on top all the time hook can do that also? Lets say...WHMCS already comes with one default announcement saying Thank you for choosing WHMCS, and for example I want it to be all the time on top, even if I create other announcement. 

The way announcement works now, latest will be on top... I have see in PhpMyAdmin that tblannouncement has an ID

image.png.6dad7d719b67344bfb983d3ede173e80.png

image.png.6fc515109436a1f09d8e39bc9ce2c085.png

Maybe a hook could say specific wanted ID to be always on top 😶.

Also I have see that WHMCS sometimes minimize  announcement saying READ MORE...there is an announcement that would be better to just be displayed full all the time.

image.png.4b8b4997099bd4d13a7994c185a50c71.png 

CSS would make it being displayed full?

 

Link to comment
Share on other sites

29 minutes ago, zitu4life said:

But if I want for example to keep one renouncement on top all the time hook can do that also?

yes.

33 minutes ago, zitu4life said:

Maybe a hook could say specific wanted ID to be always on top

yeah - you're just manipulating the array... so the hook would take the array from the page, resort it with your sticky announcement at the top and then return the array to the template.

37 minutes ago, zitu4life said:

Also I have see that WHMCS sometimes minimize  announcement saying READ MORE...there is an announcement that would be better to just be displayed full all the time. CSS would make it being displayed full?

CSS wouldn't help... the template says that if the announcement, with tags removed, is less than 350 characters, then it displays the announcement; if it's more than 350 chars, then it displays the summary instead... for your purpose to change it for one announcement, you would just add a second condition to the if statement, so...

{if $announcement.text|strip_tags|strlen < 350}

becomes..

{if $announcement.text|strip_tags|strlen < 350 || $announcement.id eq 'x'}

where x is the ID of the announcement yo want to show in full.

Link to comment
Share on other sites

  • 1 year later...
45 minutes ago, snakekir said:

Can you tell me if it is possible to configure filtering by category from the "announcements" section.

possible? I don't see why not... not out of the box though, it would have to be coded one way or another.

46 minutes ago, snakekir said:

For example:
1) News (years)
2) Promotions (active / completed)
3) Promo codes

are you envisaging a sidebar with these headings, e.g instead of months ??

the real pain would be identifying which announcements apply to which one of more of those headings... if they were kb articles, you could use tags, but I think with announcements, you would have to use keywords in either the subject or the announcement itself... or define by announcement id which of them gets included in the relevant heading's results.

i'd file this under doable, but would take some planning.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated